{ "port": 10808, "log": { "loglevel": "warning" }, "inbound": { "protocol": "socks", "listen": "127.0.0.1", "settings": { "auth": "noauth", "udp": true } }, "outbound": { "protocol": "vmess", "settings": { "vnext": [ { "address": "v2ray.cool", "port": 443, "users": [ { "id": "a3482e88-686a-4a58-8126-99c9df64b7bf", "alterId": 64, "security": "auto" } ] } ] }, "mux": { "enabled": true }, "streamSettings": { "network": "ws", "security": "tls", "tlsSettings": { "serverName": "v2ray.cool", "allowInsecure": true }, "wsSettings": { "path": "/v2ray.cool/" } } }, "outboundDetour": [ { "protocol": "freedom", "settings": {}, "tag": "direct" } ], "dns": { "servers": [ "8.8.8.8", "8.8.4.4", "localhost" ] }, "routing": { "strategy": "rules", "settings": { "domainStrategy": "IPIfNonMatch", "rules": [ { "type": "field", "port": "1-52", "outboundTag": "direct" }, { "type": "field", "port": "54-79", "outboundTag": "direct" }, { "type": "field", "port": "81-442", "outboundTag": "direct" }, { "type": "field", "port": "444-65535", "outboundTag": "direct" }, { "type": "field", "domain": [ "geosite:cn" ], "outboundTag": "direct" }, { "type": "field", "ip": [ "0.0.0.0/8", "10.0.0.0/8", "100.64.0.0/10", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.2.0/24", "192.168.0.0/16", "198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "::1/128", "fc00::/7", "fe80::/10", "geoip:cn" ], "outboundTag": "direct" } ] } }, "policy": { "levels": { "0": { "uplinkOnly": 0 } } }, "#lib2ray": { "enabled": true, "listener": { "onUp": "#none", "onDown": "#none" }, "env": [ "V2RaySocksPort=10808" ], "render": [], "escort": [], "vpnservice": { "Target": "${datadir}tun2socks", "Args": [ "--netif-ipaddr", "26.26.26.2", "--netif-netmask", "255.255.255.0", "--socks-server-addr", "127.0.0.1:$V2RaySocksPort", "--tunfd", "3", "--tunmtu", "1500", "--sock-path", "/dev/null", "--loglevel", "4", "--enable-udprelay" ], "VPNSetupArg": "m,1500 a,26.26.26.1,24 r,0.0.0.0,0" } } }