v2ray如何让出站流量走tun设备 #1062
Answered
by
jphilll
cncherisher
asked this question in
Q&A
v2ray如何让出站流量走tun设备
#1062
-
我的vps上安装了openvpn客户端并连接上了另一台openvpn服务器
配置文件已设置为route-nopull
使用v2ray代理访问yahoo.co.jp失败
|
Beta Was this translation helpful? Give feedback.
Answered by
jphilll
Nov 23, 2021
Replies: 1 comment 1 reply
-
我找到一个可用方案。
ip rule add from x.x.x.x table 128 # x.x.x.x 是 VPS 的公网 IP 地址
ip route add table 128 to y.y.y.y/y dev ethX # y.y.y.y/y 是 VPS 的公网 IP 地址的子网, ethX 是 VPS 的公网网卡名
ip route add table 128 default via z.z.z.z # z.z.z.z 是 VPS 的默认网关地址
"outbounds": [
{
"sendThrough": "0.0.0.0", # 直接从 `0.0.0.0` 网卡出站
"protocol":"freedom",
"settings":{
"domainStrategy":"UseIP"
},
"tag":"direct"
}
] |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cncherisher
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我找到一个可用方案。
.ovpn
(不要设置 route-nopull ):config.json
: