Is it possible to run only xray without starting VPN mode?

#80 · closed · 16 comments

View on GitHub ↗

kirill-782

Is it possible to run only xray without starting VPN mode?

Comments

SaeedDev94

Yes, you can start Xray in TPROXY mode, but you need root access for it (Duplicated #73)

kirill-782

Is it possible without root? I need to forward xhttp to Socks.

SaeedDev94

https://github.com/SaeedDev94/Xray/releases/tag/v11.8.6

kirill-782

Thanks, the new setting works, but the active VPN connection crashes. Is there a way to fix this?

SaeedDev94

crash? why? please provide logs ...

kirill-782

Translate error. What I mean is that even if I disable tun2socks, the app still tries to open a VPN connection, although it immediately closes it. This closes an already open VPN connection.

SaeedDev94

> What I mean is that even if I disable tun2socks, the app still tries to open a VPN connection, although it immediately closes it. That's not true, Just tested it now, The app works fine on my Google Pixel 8 Pro If it crashes for you, then provide logs so I can check it

kirill-782

https://github.com/user-attachments/assets/dc2690e7-660f-4909-923f-cc3b447fb346 I had a VPN connection established by another application, and when I disable tun2socks and launch Xray, a VPN request appears. If I don't accept it, the SOCKS proxy won't start. If I accept the request, the VPN connection closes.

SaeedDev94

Ok, this is definitely another topic to discuss. Accepting VPN connection is only for the first time It shouldn't ask twice when you already accepted it before

kirill-782

It's not the notification, but rather that my VPN is closing another app, even though it shouldn't. I suspect VPNService is launching and immediately closing somewhere under the hood, which makes it look like another VPN is closing.

SaeedDev94

What about the second try? After accepting the one time VPN permission The second try shouldn't close the first VPN app as my app doesn't open tun device

kirill-782

https://github.com/user-attachments/assets/6bd0b520-c0e2-41bf-83d4-5c270137785b

SaeedDev94

Maybe I should create a normal service Currently my service is based on Android VPN service. And I really don't want to do it because I have to duplicate the logic ... BTW why you don't use Xray-core wireguard? Without root access both are using wireguard go (user space)

kirill-782

I downloaded Wireguard as an example; I don't have any WG tunnels. My idea was to route a Socks proxy from Xray to NekoBox, which in turn connects via SplitHttp.

SaeedDev94

Try this version: https://github.com/SaeedDev94/Xray/releases/tag/v11.8.7

kirill-782

Now it works as it should. Thank you.