0
votes

Starting from this official statement that all xyAndroid versions previous API 11 doesn't support the java.net.ProSelector way to get the current proxy configuration, I would like to know if it's possible to transparently change in some way the properties that the ProxySelector class uses to store the proxy (If I'm not wrong, the ProxySelector implementation could be something like these).

The properties should be changed system wide, in order that all the 3rd party applications can access the current proxy configuration using the java.net.ProxySelector class.

Is it possible?

I'm trying to work on a OSS library so that every user with "not so much" old devices can finally set the proxy for all the well written applications.

1

1 Answers

0
votes

Each Android app runs it its own VM, so you won't be able to set system properties that span across all applications.

This is by design. Android apps are sand boxed. No one should be able to install an app that interferes with how my app connects to the network. Imagine if a rogue app could force all HTTP traffic through their proxy, and suck up all your user names and passwords.

If you want to affect network at an OS-wide level, you'll need to get into the Android platform source code. You can't do it as an application.