XTLS / Xray-docs-next

Xray-docs-next
https://xtls.github.io
Creative Commons Attribution Share Alike 4.0 International
185 stars 244 forks source link

Selected apps TProxy-fication #492

Closed Anderhar closed 8 months ago

Anderhar commented 8 months ago

Currently, the documentation provides as many as three tutorials (1,2,3) on how to set up a TProxy using IPTables, but all of them assume redirecting all system traffic, which is redundant for cases where only one app needs to be proxied, in particular some VPN client on Android. The latter is a fairly demanded task among users, but not among developers for some reason. Would it be possible to request an additional tutorial on how to redirect only selected apps to TProxy via IPTables? I think it would be in demand.

Fangliding commented 8 months ago

The working mechanics of VPN clients on Android are completely different from TProxy

Anderhar commented 8 months ago

The working mechanics of VPN clients on Android are completely different from TProxy

I mean tunnel-in-tunnel, like a chains in NekoBox, but for entire applications. Unblock restricted VPN apps by tunneling to Xray's TProxy via IPTables seems to be the best solution in terms of performance and reliability. But this applies to any other android apps without SOCKS/HTTP proxy support when occupying the system TUN is unwelcome.

Fangliding commented 8 months ago

The working mechanics of VPN clients on Android are completely different from TProxy

I mean tunnel-in-tunnel, like a chains in NekoBox, but for entire applications. Unblock restricted VPN apps by tunneling to Xray's TProxy via IPTables seems to be the best solution in terms of performance and reliability. But this applies to any other android apps without SOCKS/HTTP proxy support when occupying the system TUN is unwelcome.

Do you know that operating iptables on Android requires root access? How many people meet this condition? Incorrect configuration of iptables on Android may cause the device unable to boot. I never recommend ordinary users to do this If you have enough confidence in your abilities, you can try to configure them yourself.

Anderhar commented 8 months ago

Do you know that operating iptables on Android requires root access? How many people meet this condition? Incorrect configuration of iptables on Android may cause the device unable to boot. I never recommend ordinary users to do this If you have enough confidence in your abilities, you can try to configure them yourself.

Root access is not a problem for users, but only for developers again, which is why there's no GUI for Xray/V2Ray/Sing-Box that provides root capabilities despite requests.

That makes TProxy+IPTables combo the most elegant workaround proposed by the Shadowsocks devs as alternative, but it's on a totally different level of complexity than just installing Magisk. In fact, I've been struggling for a week trying to adapt these instructions to work with a selected applications, but my understanding of IPTables is certainly insufficient, and just a confidence will not help here.

A decent tutorial is needed, but it's nowhere to be found. Only a tons of manuals on how to proxyfy all system traffic, which is more dangerous in terms of "causing the device unable to boot".

It is very sad that you rushed to close the issue without proper analysis. Already having three nearly identical guides on TProxy+IPTables in Xray wiki, it is very strange to see a request for another one get denied.

Fangliding commented 8 months ago

@Anderhar

Root access is not a problem for users, but only for developers again, which is why there's no GUI for Xray/V2Ray/Sing-Box that provides root capabilities despite requests.

I cannot understand this sentence "not a problem for users, but only for developers" what?

It is very sad that you rushed to close the issue without proper analysis. Already having three nearly identical guides on TProxy+IPTables in Xray wiki, it is very strange to see a request for another one get denied.

It is reasonable to use tproxy on Linux PC as it already has a considerable user base You proposed an idea and entered a new field, no tutorial to be found is very very normal. If your request does meet the needs of many people, we will consider it, but because of your individual needs, we need to spend time writing a complete tutorial. Why? You want to improve proxy efficiency on Android, yes, no problem, but please learn how to do it yourself. Perhaps one day, you can bring your knowledge back to solve other people's problems or even write a guide. But it's not right to just cry like a baby and wait for parents to feed food into his mouth

Anderhar commented 8 months ago

I cannot understand this sentence "not a problem for users, but only for developers" what?

I mean, there are plenty of users of rooted devices who would be happy to unleash this power with apps like NekoBox or v2rayNG, but the developers of these apps are against such an idea.

It is reasonable to use tproxy on Linux PC as it already has a considerable user base You proposed an idea and entered a new field, no tutorial to be found is very very normal.

In fact, the user base is sufficient: it is the audience of various Magisk modules like Xray4Magisk or Box for Root, Redsocks tool, as well as those for whom TProxy support is implemented in Shadowsocks-android and will soon be in Hiddify (there must be a way to utilize this feature somehow, right?), and also those people who once again wonder how to unblock access to their favorite VPN service using XTLS or how to proxy Chrome without taking up system VPN slot. Check Google - there are plenty of such requests. Mine differs only in that I've looked deep enough to specify the solution that just hasn't been popularized enough.

But it's not right to just cry like a baby and wait for parents to feed food into his mouth

I'm sorry: it seems my polemical tone was unpleasant for you. My bad! And you may be right that I am whining, but as I said, I have spent a whole week on all this IPTables stuff without any success. As a rule, I try to do everything myself and not ask for outside assistance until that desperate moment when I finally reach my limit. But sometimes we can't go through without someone else's help, right?