1 回答
TA贡献1802条经验 获得超5个赞
通过使用这个“向上”脚本解决:
#!/bin/sh
echo "$dev : $ifconfig_local -> $ifconfig_remote gw: $route_vpn_gateway"
ip route add default via $route_vpn_gateway dev $dev table 20
ip rule add from $ifconfig_local table 20
ip rule add to $route_vpn_gateway table 20
ip route flush cache
exit 0
和这个客户 conf :
client
dev tun0
proto udp
remote fr.lazerpenguin.com 443
resolv-retry infinite
nobind
persist-key
persist-tun
ca CACertificate.crt
cert UserCertificate.crt
key PrivateKey.key
verb 5
route-method exe
route-delay 2
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
cipher AES-256-CBC
auth SHA256
keysize 256
comp-lzo
auth-user-pass login.key
script-security 2
route-noexec
route-up vpn_up.sh
现在,如果我在 curl 中将接口设置为 tun0,它将使用 openvpn,如果不是经典网络接口
- 1 回答
- 0 关注
- 267 浏览
添加回答
举报