SOCKS5轉PPTP VTWORAY配置檔案與IPTables配置檔案
阿新 • • 發佈:2021-01-03
VTWOray
{ "log": { "access": "/var/log/vTWOray/access.log", "loglevel": "warning" }, "inbounds": [{ "tag":"iptables", "port": 8888, //透明代理開放的埠號 "protocol": "dokodemo-door", "settings": { "followRedirect": true //這裡要為true才能接受來自iptables的流量 }, "sniffing": { "enabled": true, "destOverride": ["http", "tls"] } } ], "outbounds": [ { "protocol":"socks", "settings":{ "servers":[{ "address": "47.241.129.24", "port": 8358 }] }, "tag":"out1" }, { "protocol":"socks", "settings":{ "servers":[{ "address": "106.13.20.201", "port": 1080 }] }, "tag":"out2" } ], "routing": { "domainStrategy": "IPOnDemand", "rules":[ { "type": "field", "ip": ["geoip:private"], "outboundTag": "blocked" }, { "type": "field", "domain": ["geosite:category-ads"], "outboundTag": "blocked" }, { "type":"field", "source":[ "10.10.10.1" ], "outboundTag":"out1" }, { "type":"field", "source":[ "10.10.10.2" ], "outboundTag":"out2" } ] } }
iptables
# Generated by iptables-save v1.4.21 on Mon Dec 21 17:48:35 2020 *filter :INPUT ACCEPT [1061:156114] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [780:202895] COMMIT # Completed on Mon Dec 21 17:48:35 2020 # Generated by iptables-save v1.4.21 on Mon Dec 21 17:48:35 2020 *nat :PREROUTING ACCEPT [18:1251] :INPUT ACCEPT [18:1251] :OUTPUT ACCEPT [12:732] :POSTROUTING ACCEPT [12:732] :SSTCP - [0:0] -A PREROUTING -p tcp -j SSTCP -A SSTCP -d 0.0.0.0/8 -j RETURN -A SSTCP -d 10.0.0.0/8 -j RETURN -A SSTCP -d 127.0.0.0/8 -j RETURN -A SSTCP -d 169.254.0.0/16 -j RETURN -A SSTCP -d 172.16.0.0/12 -j RETURN -A SSTCP -d 192.168.0.0/16 -j RETURN -A SSTCP -d 224.0.0.0/4 -j RETURN -A SSTCP -d 240.0.0.0/4 -j RETURN -A SSTCP -i ppp+ -p tcp -j REDIRECT --to-ports 8888 -A POSTROUTING -s 10.10.10.0/24 -o eth0 -j MASQUERADE COMMIT # Completed on Mon Dec 21 17:48:35 2020
PPTP或者L2TP自己建立