4

how to bypass android phone wifi proxy?

I start up fiddler on pc, and then i set wifi proxy on my android phone, now i can capture traffic; for security, i don't allow anybody capture traffic, so my app need to bypass local wifi proxy and directly to the Internet.

galaxy bruce
  • 175
  • 1
  • 2
  • 7

2 Answers2

3

Maybe this will work for you with Proxy.Type.DIRECT

http://developer.android.com/reference/java/net/URL.html#openConnection%28java.net.Proxy%29

http://developer.android.com/reference/java/net/Socket.html#Socket%28java.net.Proxy%29

But on rooted phone this can be still redirected with iptables rules.

As is in SandroProxy or other proxies on rooted phones.

btw: send by sandroproxy support

  • this question like http://stackoverflow.com/questions/9544582/how-android-application-decide-if-they-want-to-use-network-proxy-or-not , but has not resovled. – galaxy bruce Oct 13 '13 at 05:14
  • The reason that you want this is that nobody capture your traffic. You can archive this only by ssl certificate pinning. Then is no matter if there are proxies or any other interceptors involved. You should consider that path of implementation. – SandroProxy support Oct 13 '13 at 07:00
  • thanks, but ssl certificate pinning requiers server surport, is ther a way app client could make it? – galaxy bruce Oct 13 '13 at 13:51
  • You need ssl so server must have certificate. But otherwise all ssl cert checking is done on client. – SandroProxy support Oct 13 '13 at 16:09
1

To add to Sandproxy's answer, don't allow app to run on rooted phones, this way, no one will be able to capture HTTPS traffic.

Certificate pinning is another option but with this all requests made by user would be blocked if those are proxied by Fiddler(since app won't trust Fiddler's root certificate). So, this is not a friendly option for the user.

rohitverma
  • 767
  • 2
  • 9
  • 14