Tunnel (Android) network traffic through a proxy server using the VpnService API

I am looking for a way to tunnel all network traffic through a proxy.

Since it is not possible to manage a system-wide proxy without root access, Android VpnService seems to be the only way to achieve this.

I know that I need to extend the VpnService class and create a Builder , and also call the .establish () method to create a new VPN interface.

Now, what parameter of the Builder class should I use to establish a connection with a proxy server and direct all traffic?

+6
source share

All Articles