SOCKS5转PPTP VTWORAY配置文件与IPTables配置文件
VTWOray
/etc/vtworay/config.{
"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,
"users": [{
"user":"username",
"pass":"password",
"level": 0
}]
}] }, "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
/etc/sysconfig/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自己建立
帐号添加:一行一个
[root@iZ7xve1shjzcyal09fs7gvZ]# cat /etc/ppp/chap-secrets "user1" l2tpd "pass" 10.10.10.1 "user2" l2tpd "pass" 10.10.10.2