Last active
June 30, 2020 16:58
-
-
Save Kr328/80cd27f13676d0155d66512ea59f60b0 to your computer and use it in GitHub Desktop.
Revisions
-
Kr328 revised this gist
Jan 10, 2020 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,6 @@ PROXY_BYPASS_USER="proxy" PROXY_BYPASS_CGROUP="0x16200000" PROXY_FWMARK="0x162" PROXY_ROUTE_TABLE="0x162" PROXY_DNS_SERVER="127.0.0.1:1053" @@ -19,7 +18,7 @@ iptables -t mangle -D OUTPUT -j CLASH iptables -t mangle -D PREROUTING -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK" iptables -t nat -D OUTPUT -p udp --dport 53 -j CLASH_DNS iptables -t nat -D PREROUTING -p udp --dport 53 -j DNAT --to "$PROXY_DNS_SERVER" iptables -t mangle -F CLASH iptables -t mangle -X CLASH @@ -29,4 +28,4 @@ iptables -t nat -X CLASH_DNS ipset destroy localnetwork exit 0 -
Kr328 revised this gist
Jan 2, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,4 +27,6 @@ iptables -t mangle -X CLASH iptables -t nat -F CLASH_DNS iptables -t nat -X CLASH_DNS ipset destroy localnetwork exit 0 -
Kr328 created this gist
Dec 20, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ #!/bin/bash PROXY_BYPASS_USER="proxy" PROXY_BYPASS_CGROUP="0x16200000" PROXY_SOCKS_SERVER="127.0.0.1:1080" PROXY_FWMARK="0x162" PROXY_ROUTE_TABLE="0x162" PROXY_DNS_SERVER="127.0.0.1:1053" PROXY_FORCE_NETADDR="198.18.0.0/16" PROXY_TUN_DEVICE_NAME="clash0" ip link set dev "$PROXY_TUN_DEVICE_NAME" down ip tuntap del "$PROXY_TUN_DEVICE_NAME" mode tun ip route del default dev "$PROXY_TUN_DEVICE_NAME" table "$PROXY_ROUTE_TABLE" ip rule del fwmark "$PROXY_FWMARK" lookup "$PROXY_ROUTE_TABLE" iptables -t mangle -D OUTPUT -j CLASH iptables -t mangle -D PREROUTING -m set ! --match-set localnetwork dst -j MARK --set-mark "$PROXY_FWMARK" iptables -t nat -D OUTPUT -p udp --dport 53 -j CLASH_DNS iptables -t nat -D PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 1053 iptables -t mangle -F CLASH iptables -t mangle -X CLASH iptables -t nat -F CLASH_DNS iptables -t nat -X CLASH_DNS exit 0