Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local Proxy Server Running On Android Device

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?

like image 265
fran6 Avatar asked Sep 29 '13 19:09

fran6


People also ask

Can I use proxy on Android?

All Android devices allow the configuring of proxy settings on Wi-Fi and mobile networks. You can access search engines and many apps using proxies.

What does proxy mean on Android?

A mobile proxy is a portable device — for example, a smartphone or a tablet — that has access to the internet via mobile data. You can connect to such proxies to mask your real IP address with the device's one.


1 Answers

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 :)

like image 72
SandroProxy support Avatar answered Oct 13 '22 00:10

SandroProxy support