|
|
|
手动在配置文件添加了socks5的配置。怎么配置所有ray的流量都走这个socks5出站?
研究了下整不明白。。。。 只能实现指定域名分流到s5,可是我想全部流量都走s5出站。
有大佬知道怎么整吗? 问gpt,他也说不明白:L
结案了,虽然搞得乱七八糟的,但是实现我的目的了,因为不会将全部流量都导入到s5,所以投机取巧了一下。
让ray把所有非CN的流量全部转发到S5,变相实现了这个功能。代码如下。其中,outbound里面新增你的S5信息。
然后路由内添加规则,非大陆IP的访问TCP/UDP被转发到此S5。测试成功。- { "api": { "services": [ "HandlerService", "LoggerService", "StatsService" ], "tag": "api" }, "inbounds": [ { "listen": "127.0.0.1", "port": 62789, "protocol": "dokodemo-door", "settings": { "address": "127.0.0.1" }, "tag": "api" } ], "outbounds": [ { "protocol": "freedom", "settings": {} }, { "protocol": "blackhole", "settings": {}, "tag": "blocked" }, { "tag": "标签名称 我默认写的是one", "protocol": "socks", "settings": { "servers": [ { "address": "你的S5 IP", "port": 端口, "users": [{ "user": "用户名", "pass": "密码" } ] } ] } } ], "policy": { "system": { "statsInboundDownlink": true, "statsInboundUplink": true } },"routing": { "rules": [ { "inboundTag": ["api"], "outboundTag": "api", "type": "field" }, { "ip": ["geoip:private"], "outboundTag": "blocked", "type": "field" }, { "outboundTag": "blocked", "protocol": ["bittorrent"], "type": "field" }, { "not": [ "geoip:cn" ], "outboundTag": "one", "type": "field", "network": "tcp" }, { "not": [ "geoip:cn" ], "outboundTag": "one", "type": "field", "network": "udp" } ]}, "stats": {}}
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|