Local Proxy Server Running On Android Device

fran6 picture fran6 · Sep 29, 2013 · Viewed 17.3k times · Source

I am trying to write a http proxy server that would run on the device itself. In fact, need to find a way to capture the outbound http traffic generated by the device.

The code I have so far is compiling OK, it is based on the code found here: http://www.jtmelton.com/2007/11/27/a-simple-multi-threaded-java-http-proxy-server/

The problem is that the http request to the actual server would block and never return .

Is there a better way to write such a service without rooting the device?

Answer

SandroProxy support picture SandroProxy support · Oct 1, 2013

You should check SandroProxy. Can caputre traffic on non rooted device if os proxy settings are used, or with iptables rules on rooted one. Traffic is stored it in local sqlite database. Captured data can be also examined by chrome devtools. To capture traffic in your app you should check source code for plugins. It has all the code for iptables redirections and proper settings.

Check out the wiki link on google source code HowToInterceptTrafficOnMyOwn

http://code.google.com/p/sandrop/wiki/HowToInterceptTrafficOnMyOwn

btw: send by sandroproxy support :)