tun2socks - fbion/macos.safe GitHub Wiki

https://github.com/imgk/shadow brew install [email protected] go get -v -ldflags="-s -w" -trimpath -tags="socks5" github.com/imgk/shadow 通过路由表劫持dns来响应实现fakedns

https://github.com/eycorsican/leaf so so

https://github.com/gfreezy/seeker dns_listen: 192.168.1.66:53 有单独实现fakedns server

https://github.com/monsterxx03/snet 通过openbsd pfctl实现国内外ip分流 程序监听一个tcp用来转发tcp请求给代理 监听一个udp用来dns table <BYPASS_SNET> persist file "./BYPASS_SNET.txt" lo = "lo0" dev = "en3" client = "192.168.1.66/24" rdr on lo0 inet proto tcp from {$dev} to any port 1:65535 -> 127.0.0.1 port 1111 rdr on lo0 inet proto udp from {$dev} to any port 53 -> 127.0.0.1 port 1211

rdr log on $dev inet proto tcp from {$client} to any port 1:65535 -> 127.0.0.1 port 1111 rdr log on $dev inet proto udp from {$client} to any port 53 -> 127.0.0.1 port 1211

pass out on $dev route-to $lo inet proto tcp from {$dev} to any port 1:65535 pass out on $dev route-to $lo inet proto udp from {$dev} to any port 53

pass out inet proto udp from any to 127.0.0.1

pass out proto tcp from any to <BYPASS_SNET> BYPASS_SNET为中国ip表 走直连

https://github.com/txthinking/brook sudo ./brook_darwin_amd64 --debug hijackhttps --socks5 127.0.0.1:1080 --listenIP 192.168.1.66 这时候brook会在192.168.1.66监听 udp 53 和 tcp 443 udp 53 返回所有解析为 192.168.1.66 客户端访问https://www.google.com/时 实际访问 https://192.168.1.66 brook再所请求转给socks5 但是如果是http80不行

https://github.com/txthinking/tun2brook --bypassCIDR4List value https://, http:// or local file path, like: https://txthinking.github.io/bypass/china_cidr4.txt mac os 上会route add chinaip 实现直连 太多条 不优雅

https://github.com/xjasonlyu/tun2socks 无fakedns

https://github.com/xjasonlyu/go-tun2socks 有fakedns 已停止开发

surge

clash