Asterisk4Magisk / Xray4Magisk

Xray core with service scripts for Android
387 stars 44 forks source link

[HELP] "Cannot find your tun device xtun" #92

Closed Anderhar closed 5 months ago

Anderhar commented 8 months ago

Greetings!

I'm hoping to utilize this Magisk module instead of traditional GUI clients to avoid occupying system VPN in scenarios where it's necessary to tunnel selected apps without proxy support. As far as I understand, this is accomplished by using TUN mode in combination with Sing-Box core (because Xray doesn't support TUN). Unfortunately, when I try to deploy this configuration referring to example configs (1&2), the xrayhelper proxy refresh command always results in the following output:

ERROR : [tun] XrayHelper/main/proxies/tun: cannot find your tun device xtun did you configure core correctly?

I would greatly appreciate being pointed out to my oversight and, if possible, for some detailed instructions regarding TUN (because these are just my baby steps in learning proxy tools of this type).

tsaiajie commented 8 months ago

Xray4Magisk three modes tproxy, tun, tun2socks, all can do not occupy the system VPN Xray can use tproxy, tun2socks, tun will be added in version 1.9. You can use tproxy, he is the default mode of Xray4Magisk, just need to directly on the default configuration to change some parameters to your can be used!

CerteKim commented 8 months ago

You may need to add "interface_name": "xtun", in sing-box's tun configuration

Anderhar commented 8 months ago

all can do not occupy the system VPN

Most GUI clients can as well (via local proxy), but I need to tunnel applications without proxy support, notably third-party VPN apps blocked by my authorities (i.e. tunnel in a tunnel). Are tproxy or tun2socks fit for that?

change some parameters

If tproxy is actually fits for tunneling other VPN apps, then what exactly are the parameters you are talking about?

You may need to add "interface_name": "xtun", in sing-box's tun configuration

Unfortunately, it did not work. Pretty strange that it's not in the example configs.