Skip to content

Instantly share code, notes, and snippets.

@bingzhangdai
bingzhangdai / 9p_virtio.md
Created July 18, 2020 08:13
Set up VirtFS (9p virtio) for sharing files between Guest and Host on Proxmox VE

How-to

  1. On Host(PVE), edit /etc/pve/qemu-server/VMID.conf
args: -fsdev local,security_model=mapped,id=fsdev0,path=/path/to/share -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare

This tells qemu to create a 9pvirtio device exposing the mount_tag hostshare (just a name to identify the mount point). That device is coupled to an fsdev named fsdev0, which specifies which portion of the host filesystem we are sharing, and in which mode.

@HarvsG
HarvsG / PiServer.md
Last active September 30, 2020 03:22
A method to develop a server that allows you to run your Pis SD-less and switch easily between projects

Based on this hands-on

  1. Install piserver on a debian or ubuntu system from source using the tutorial there
    • sudo apt-get install build-essential devscripts debhelper cmake libldap2-dev libgtkmm-3.0-dev libarchive-dev libcurl4-openssl-dev intltool git binfmt-support qemu-user-static
    • git clone --depth 1 https://github.com/raspberrypi/piserver.git
    • cd piserver
    • debuild -uc -us
    • cd ..
    • sudo dpkg -i piserver*.deb
  • If dnsmasq -v is <2.77 then you will need to update it (see link above)
@snakevil
snakevil / howto-setup-transparent-proxied-router.md
Last active April 1, 2024 01:28
如何在路由器中实现透明代理?

如何在路由器中实现透明代理?

0 互联网现状

目前整个互联网环境,被破坏最严重地部分,是 Web 服务体验。当直接破坏难以实现时,就会从流程链的上下游着手,如:DNS 污染。

其它地互联网服务类型,例如:邮件,可能小部分会受到 Web 服务上下游破坏地余震,但整体上基本不受影响。

@wen-long
wen-long / ss-redir 透明代理.md
Last active March 18, 2024 12:13
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个