Skip to content

Instantly share code, notes, and snippets.

View szrenwei's full-sized avatar
🎯
Focusing

任为 szrenwei

🎯
Focusing
View GitHub Profile
@szrenwei
szrenwei / README.md
Created November 15, 2023 14:59 — forked from cld4h/README.md
Bypass the GFW; clash fake-ip and tproxy; iptables and transparent proxy on Linux; 在Linux上通过 iptables 以及 clash 配置透明代理用于本机及局域网翻墙网关; Linux 翻墙路由器配置

This article show you the ultimate way to set up a transparent proxy on Linux using clash and iptables to bypass the GFW in China.

We use:

You can go to github gist to download all files mentioned in this article.

@szrenwei
szrenwei / a-clash-tproxy-gateway.md
Created November 15, 2023 14:59 — forked from phlinhng/a-clash-tproxy-gateway.md
Clash as transparent proxy gateway via TPROXY

Notes

  1. If your local network use public IP ranges instead of private ones, make sure to add respecive RETURN rules to iptables to prevent looping issue
  2. Set clash as DHCP's only DNS server to allow domain-based filter (shunting) rules work
  3. Use lsof -i udp:53 to check if clash's DNS module work fine, otherwise you may have to kill systemd-resolved and any other processes occupying the UDP 53 port
  4. The given scripts will NOT hangle the traffic of gateway itself since it is not recommend to do so. If you want to redirect the egress traffic of the gateway, the following material may be useful

Reference

@szrenwei
szrenwei / wef
Created November 18, 2021 09:42
Created from Remix Form!
wefew
@szrenwei
szrenwei / wf
Created November 18, 2021 09:42
Created from Remix Form!
wefw
@szrenwei
szrenwei / hahah
Created November 18, 2021 09:41
Created from Remix Form!
fewfewf
@szrenwei
szrenwei / wfw
Created November 18, 2021 09:36
Created from Remix Form!
efwef