Address of ovpn server to avoid recurrent loop packet passing.
Wonât routes 0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth0
and 192.168.230.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
do this?
This rules says that routing via virtual gateway is preferred. So all packets for ovpn server are routed via tun. It is necessary to add the exception for ovpn server address.
Iâm too lazy to check the configuration on VM right now. Maybe other members of community will help you.
I dont really get what you want. Do you still want to bind only some apps to the tun? Then why are you setting a gateway at all? Remove route option in the config and it should work âcurl -v --interface tun0 http://ifconfig.meâ
Doesnât work without route option (neither in Windows nor Linux)
What does curl return
Curl works, but I still canât bind to interfaceâs ip.
What kind of application you want to bind?
V2Ray outbound
It works, i did it just like that on my vps: ignored default gateway in ovpn and specified âinterfaceâ sockopt in xray freedom out. Whats your result? Do you get an error or xray still binds to default gateway?
Ok, how to specify interface name in windows?
Probably the same way. Windows wg/awg app based split tunneling is a similar topic
Please send your outbound configuration (if itâs not secret).
didnât test
{
"inbounds": [
{
"listen": "127.0.0.1",
"port": "1080",
"protocol": "socks",
"settings": {
"ip": "127.0.0.1",
"udp": true
}
}
],
"log": {
"loglevel": "warning"
},
"outbounds": [
{
"protocol": "freedom",
"streamSettings": {
"sockopt": {
"interface": "tun0"
}
},
"tag": "direct"
}
],
"routing": {
"domainStrategy": "AsIs",
"rules": []
}
}
similar sing-box config is in that topic
Thank you very much!
Doesnât work in v2ray 4.34.0
(v5.0.6+
required)
idk why such an old software, but you can use another routing table (555) with only your tun as a gateway, use clean freedom outbound and run gray as a user, then use âip rule add uuidrange userid-userid table 555â (or just run the software you need as a user instead of gray)
But how to make it work like on windows, adding route 0.0.0.0 0.0.0.0
to ovpn specifies interface gateway and allows to bind to this ip?
wdym? i have no idea how you bound the apps to the tun interface on windows