56

If you set up proxy settings for an android device, do they apply to all apps on the device including the browser? Or do they only apply to the browser?

The reason I ask is that when you go to change the proxy settings on an android device there is this message, and it is confusing me:

"HTTP proxy use by browser but may not be used by other applications"
Micro
  • 10,303
  • 14
  • 82
  • 120

7 Answers7

72

No, they do not apply globally and without root there is no way to force a proxy to be used by all applications. The reason the message you found is worded that way is that it is up to the app creator to respect the proxy settings and use them or do the wrong thing and ignore them.

If you happen to be rooted, you can use this app which will apply the proxy settings to all apps and activities.

The reason that this is not the default behavior is because it could present some security risks. If all traffic could be redirected, users could have all of their traffic be going through some bad proxy server that snoops on them so they default to only allowing apps to use proxy if they explicitly ask for it.

Julian Jocque
  • 892
  • 10
  • 12
  • 1
    Interesting. That explains a lot. Thanks. – Micro Jun 25 '14 at 20:02
  • 1
    is there any method to allow the apps to access internet via proxy without root. by specifying something that, this proxy server is trusted does nothing than to pass the internet packets – shiv garg Mar 22 '15 at 14:08
  • YES. God I'm so happy. Thank you for answering. – Dylan Pierce Nov 07 '15 at 17:24
  • 3
    lol, on iphone you can easily configure proxy for everything, very cool for developing – Alexander Danilov Jul 07 '16 at 11:05
  • just an observation: there are proxy related settings in apn, namely server, port, username, and password. i tried to fill out with my dante socks5 information there, my server did log the connection attempts from my cell phone, but probably limited by my sim card type, the connection failed at the negotiation stage. the os is android 7.0. maybe someone can experiment with a "good" sim card? – eN_Joy Nov 07 '18 at 23:19
  • 2
    I have tried proxydroid on Android 8.1-RC1 and it just keeps crashing – paolov Jun 09 '19 at 11:59
  • This is an insightful post/answer, but is there reference links that further elaborate on this topic? It would be helpful to see those than to take the answer "as is". Documentation on this intended behavior, and how to have app request to use a proxy, etc. – David Jan 11 '21 at 22:37
  • It would be helpful if we can also see how this answer here can be applied to & elaborated for this SO post: https://stackoverflow.com/q/60126563/425997 – David Jan 11 '21 at 23:51
  • I came across another post with a blurb relating to apps not respecting the OS proxy config (from linked articles/posts), but again it doesn't provide any further context to that behavior/finding: https://www.programmersought.com/article/93914627739/. – David Jan 27 '21 at 01:52
  • There might also be some cases where tha app is using a port different than 80,443 which is the only ports proxydroid is listening. So in this case you should consider other approaches like using a hotspot or iptables ... you can read more about this in here : http://blog.dornea.nu/2014/12/02/howto-proxy-non-proxy-aware-android-applications-through-burp/ – Mahdi Aug 06 '21 at 14:27
  • Drony do use the proxy as VPN so it intersect all traffic, I also see other port running to it. can you base what you say ? – Sion C Dec 17 '21 at 08:38
14

Try postern. It redirect all the traffic to a local vpn and support:

  • SSH Tunnel
  • Shadowsocks
  • SOCKS5 Proxy
  • HTTPS/HTTP CONNECT

You can find it here:

https://play.google.com/store/apps/details?id=com.tunnelworkshop.postern

and more similar apps like it here:

https://android.izzysoft.de/applists.php?topic=cat;id=109

MSS
  • 3,520
  • 24
  • 29
3

Not sure what apps will or won't use the proxy. I have a couple of Android apps and they ignored it.

I got around this by using an app called drony, which doesn't require the device to be rooted. I have a few apps and they all happily proxied to drony without having to do anything to the app. I then set drony to proxy to fiddler on my local machine. Instructions to set this up are all here: Setup global proxy in your android device without rooting!

Nick Wright
  • 1,403
  • 13
  • 19
  • 4
    I read the article in the link, but can't understand why proxying to localhost in the wifi settings is expected to be more successful than any other proxying. If an app isn't proxy-aware, wouldn't it ignore the localhost proxy just the same? – Oren Oct 23 '17 at 05:21
  • @Oren maybe it has to do with how the local traffic routing works on Android or localhost makes the system behave a bit different (because localhost is sometimes a loopback connection to device itself and doesn't actually go out the network and back to the host, taking a shortcut since it's local). – David Jan 27 '21 at 00:16
2

as Julian said, some apps or SDKs inside apps are not Proxy aware.

I experienced this first hand with an SDK. I couldn't understand why it was not showing up my Burp tool. I eventually found out that it was proxy unaware.

As Julian said, you can use an Android app to fix this. An alternative - I used - invisible proxying. Have a look at: https://portswigger.net/burp/help/proxy_options_invisible.html

rustyMagnet
  • 3,479
  • 1
  • 31
  • 41
  • Julian's answer was insightful, but do you know if there are reference links that further elaborate on that topic? It would be helpful to see those than to take the answer "as is". Documentation on this intended behavior, and how to have app request to use a proxy, etc. – David Jan 27 '21 at 00:11
  • For your case was the SDK third party, or your own custom SDK? – David Jan 27 '21 at 00:11
0

If you change the proxy settings via Wifi->Settings->Proxy(Manual) , as informed by your device, it is clearly not possible to apply in all applications. Despite this, it is possible to achieve the result, without rooting your device, with the Drony application.

Drony is being updated until today (23 Jan 2023) and even allows filtering urls as desired.

  1. Before opening Drony, configure your wifi network and set the proxy hostname to localhost and the port to a free one like 2000.
  2. Download Drony from the playstore and accept all permissions required for its use;
  3. In the settings tab, change the proxy port to the port defined in step 1 2000; enter image description here
  4. Under Networks, click Wi-Fi, select the network you configured the port on in step 0. enter image description here
  5. Change hostname, port, username, and other settings as desired. enter image description here
  6. Go back to the Log tab, click On and that's it! enter image description here

You can check filtered connections in the FILTER tab and connections in the CONNECTIONS tab.

Good luck fellas!

0

I guess many users will come here in search of a way to capture and analyze Android app traffic, although this is not explicitly mentioned in the OP. So please forgive my only 50% hit of the question:

I found that https://emanuele-f.github.io/PCAPdroid is a good tool to capture and analyze app traffic. It is Open Source, still available in Play Store, and still actively developed (status 2023).

It does not require any rooting and has methods to even spy into encrypted traffic (TLS). You can install it on the same Android device as the app that you want to analyze.

Jpsy
  • 20,077
  • 7
  • 118
  • 115
-2

This isn't correct. Nearly all apps will respect HTTP proxy settings. Xamarin.Android often doesn't but you can override this in your webclient.

PS: If this fails you can use wireshark in all cases to do this.

Martin Alderson
  • 892
  • 1
  • 7
  • 14