wgtunnel icon indicating copy to clipboard operation
wgtunnel copied to clipboard

[FEATURE] - Local HTTP/SOCKS5 proxy mode for use with other VPNs

Open Dondrejohnson5 opened this issue 1 year ago • 11 comments

Is your feature request related to a problem? Please describe. For quite a long time now I've always been torn between using the best ad blocker for Android, AdGuard, and using Cloudflare Warp via WireGuard for faster internet (no video buffering, less ping in video games, etc). I can't use both because Android only allows one VPN active at a time. AdGuard does have an automatic proxy mode for rooted devices to allow using WireGuard with it though, but ad filtering will not work if an ipv6 address is specified in the WireGuard config, which must result in me essentially connecting to ipv4 only, in order to continue experiencing the best of both AdGuard and Cloudflare Warp.

Describe the solution you'd like A mode in WG Tunnel that allows exposing configs to other compatible VPNs, like AdGuard, in a form of a local (127.0.0.1:xxxx) HTTP and/or SOCKS5 inbound proxy. In this manner, AdGuard, in it's regular VPN mode can filter ads in both ipv4 and ipv6 connections like normal, but through the proxy, so that I may also experience the benefits of Cloudflare Warp.

Describe alternatives you've considered

  • Kernel userspace mode in WireGuard: with that enabled, whether AdGuard is in VPN mode or automatic proxy, the same undesirable results occur so long as an ipv6 config is specified in the WireGuard config.
  • SagerNet (depreciated; based on v2-ray) & successor, sing-box (based on sing-box): both SagerNet and sing-box cannot refresh its proxy connection automatically, so when the Android device regains cell service or connects/disconnects from Wifi, all apps not excluded from AdGuard filtering in VPN mode will not connect to the internet until the responsible proxy app is manually stopped and restarted.
  • SagerNet fork, Matsuri (depreciated; based on v2-ray) & successor, NekoBoxForAndroid (based on sing-box): Matsuri, like SagerNet, did not well support WireGuard configs, as the app's base arch, v2-ray, does not support WireGuard configs at all, so connections were often unstable; NekoBoxForAndroid, like both Matsuri and SagerNet, 1): have a lot more settings that I deem unnecessary, unappealing, and just confusing for my use case, that, if tampered with, with limited proper knowledge of them, can drastically affect the connection for better or worse, and 2): are simply battery drainers compared to sing-box and WireGuard itself.

Additional context I recently found another GitHub project called Wireproxy. I haven't tried it, but, given the description of the project, it seems to present the solution related to my issue, it's just not made for Android. Hopefully it's content helps though.

Dondrejohnson5 avatar Jan 09 '24 18:01 Dondrejohnson5

Thank you for all of these details and for creating an issue for this feature! I'll looking into this.

zaneschepke avatar Jan 10 '24 04:01 zaneschepke

@zaneschepke

I'm having the same issue along with many other people who want to use Adguard for adblocking with cloudflare warp for faster speeds.

Rtizer-9 avatar Jan 17 '24 04:01 Rtizer-9

Probably one of the possible options, support for the cloak plugin, as was done in the shadowsocks client https://github.com/cbeuw/Cloak-android

Jabber-se avatar Feb 24 '24 21:02 Jabber-se

@Jabber-se I looked into the cloak plugin and it seems it is not compatible with wireguard.

I am having a hard time with Adguard's android app. It doesn't seem to request root even though I am on a rooted emulator.

@Dondrejohnson5 @Rtizer-9 Do either of you know how to get the Adguard android app to request root?

zaneschepke avatar Mar 09 '24 22:03 zaneschepke

@zaneschepke sorry for the late reply. I hope you've already figured it out. Anyway adguard is going to request root only when you use "automatic proxy" mode instead of VPN mode. In magisk it'll request but in ksu every root request needs to be manually granted.

Rtizer-9 avatar Jun 25 '24 19:06 Rtizer-9

@Rtizer-9 last he and I spoke, he was testing all this on his own fork of the wg library. I don't remember what he said about it all going wrong, but for the sake of the stability of the app, he fell back to the official library. I'm not sure he's worked on this issue since

Dondrejohnson5 avatar Jun 25 '24 19:06 Dondrejohnson5

Ok I understand. Singbox is also stable with adguard now and wireguard works perfectly there on alpha releases at least for me.

Rtizer-9 avatar Jun 26 '24 03:06 Rtizer-9

The underlying IPv6 issue has finally been resolved on AdGuard's end, therefore mitigating the need for this request any further

Dondrejohnson5 avatar Jul 25 '24 19:07 Dondrejohnson5

An HTTP/SOCKS proxy mode can be useful, beyond this specific use case with Adguard. I'd request to keep this issue open, if this feature is still in consideration.

onnyyonn avatar Jul 25 '24 19:07 onnyyonn

I am using AdGuard app in Local VPN mode (because no root), and using the Proxy feature to route traffic to Shadowsocks tunnel on demand. It is proven very useful, and I would still like to see this implemented for Wireguard/Amnezia.

cjmaxik avatar Aug 23 '24 09:08 cjmaxik

Reopened, as others would still like to see this feature come to fruition

Dondrejohnson5 avatar Aug 27 '24 19:08 Dondrejohnson5