SOCKS5转PPTP VTWORAY配置文件与IPTables配置文件

技术资料 分享,Linux
0 3061
admin
admin 自由达人 2023-01-07 21:32:47
用户等级:5级

VTWOray 

/etc/vtworay/config.{

<em id="__mceDel">  "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,<br>                             "users": [{<br>                               "user":"username",<br>                               "pass":"password",<br>                               "level": 0<br>                              }]<br>
                    }]
                },
                "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"
                }
                ]
            }
}
</em>


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


本文章最后由 admin2023-01-07 21:34 编辑
楼主签名:唱跳rap和篮球
回帖
回复列表