Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,526 Members 49,938 Now Online
XDA Developers Android and Mobile Development Forum

[APP] Autoproxy for android Http(s), Socks, Proxy.pac Ntlm [24.Aug.13]

Tip us?
 
Moronig
Old
(Last edited by Moronig; 25th August 2013 at 03:24 AM.) Reason: Added info about update 0.75, g+ community link
#1  
Senior Member - OP
Thanks Meter 195
Posts: 375
Join Date: Dec 2010
Location: Curitiba

 
DONATE TO ME
Smile [APP] Autoproxy for android Http(s), Socks, Proxy.pac Ntlm [24.Aug.13]

Autoproxy creates a transparent/intercepting proxy running on your phone, and redirects web traffic through it, so other apps don't have to be aware there is a proxy. All outgoing traffic is captured, formatted and transmitted through your network's proxy. That means it works with other browsers, gmail and maps. The core of this app is the redsocks proxy redirector, and cntlm. It now works with proxy.pac files.

WARNING: Your phone must be rooted and have an iptables binary with nat support.

Download links at the bottom, scroll down to see

This app is based on the TransProxy app by daveba (link).

I have modified it, and added to the basic funcionality. Please try it and let me know what you think.
Bug reports/suggestions are welcome. (keep in mind this is the first app I release!)

What's new:

Version 0.75 beta[24.Aug.2013]:
  • I ain`t dead!
  • Several bugfixes
  • Updated holo layout
  • Option to check if proxy is at specified address before connection
  • Expanded notification shows sent bytes through proxy (Android > 4.1)
  • option on notification to disconnect (Android > 4.1)
  • Lite version now auto-connects as well (no need to open app)
  • Get newest beta from XDA or directly from Play Store. Must join G+ Community
  • Logs now saved to sdcard

Please report bugs, they will be fixed as soon as possible

Version 0.57 [02.Dez.2011]:
  • Added Thai translation
  • Fixed SQlite errors caused by multiple simultaneous access to the database

Version 0.56 [28.Nov.2011]:
  • Added compatibility to Honeycomb (Android 3.x)
  • Added compatibility to Ice Cream Sandwhich (Android 4.0)
  • Fixed a bug that prevented app from running on Donut (Android 1.6)
  • Added polish translation (thanks Devastator)

Version 0.54 [23.Nov.2011]:
This version and the future ones will be available on the market. Check it out here.
  • Fixed a bug where app would crash if you changed notification options while connected
  • Fixed a bug where it would falsely show as connected if superuser permission given to redsocks, but not to iptables.
  • Updated german and french translations. Thanks elec.ted and Atomusk
  • Added lite version (free, ad-supported) in market.

Version 0.53 [22.Nov.2011]:
  • Fixed a bug where authentication info was not saved
  • Changed package name, you should uninstall the old version before installing this one.

Version 0.5 [21.Nov.2011]:
  • Forward custom ports (Note: your proxy must allow connection through the ports)
  • Added support for proxy.pac files
  • Added support for not proxying connections to a host (for use with connectbot)
  • Connections to local network now go directly (not through proxy)
  • Added connection progress info
  • Fixed a bug where autoproxy would not disconnect when it had FC during connection
  • Logging is now turned off by default
  • Connection now done in background thread
  • Now available in spanish! (thanks stefano.pazzaglia)
  • Now available in italian! (thanks stefano.pazzaglia)
  • Now available in german! (thanks pulverJohnny)
If you wish to see autoproxy in your language, you can help here.

Version 0.33 [14.Nov.2011]:
  • Added localization in french (thanks to mobilis2009)! If you wish to see autoproxy in your language, you can help here.
  • Fixed reconnection bug. Autoproxy will ask for root permissions a lot less now.
  • Streamlined native command execution. Connect/disconnect faster.
  • More stable when autoconnecting to proxy on mobile networks. (Thanks adsl17910 for help testing this)

Version 0.3 [11.Nov.2011]:
  • Added localization in portuguese! If you wish to see autoproxy in your language, you can help here.
  • Minor bugfixes

Version 0.289 [10.Nov.2011]:
  • Added option to always show notification icon, even when disconnected
  • Fixed error "Failed to start proxy.sh (…) bind Address already in use)
  • Fixed error that made Autoproxy ask for root permissions on every network state change
  • Fixed error where autoproxy was connected, but the disconnect button was not enabled
  • Changed command to stop redsocks: manually creating symlink for killall no longer necessary
  • Added another redirect method, will now work for people that had an error "No chain/target/match"
  • Updated redsocks binary (reduced app size)
  • Stops the service when you close the app (by pressing the back key) to save memory. Will not affect functionality
  • Minor UI tweaks

Version 0.27 [4.Nov.2011]:
  • Made it backward compatible with Android 1.6 Donut (api 4)
  • Attempted fix for error "Failed to start proxy.sh (…) bind Address already in use)
  • Moved log files to app-logs folder, under the app path, so that android doesn't auto-delete it.
  • Minor UI changes

Version 0.25 [31.May.2011]:
  • Fixed issue: Error when starting proxy :log_preopen(file:/data/data/net.moronigranja.tproxy/files/../cache/redsocks.log,...): No such file or directory
  • Added limit to cache files, cache will be limited to 1Mb

Version 0.24 [31.May.2011]:
  • Fixed issue: Sometimes doesn't reconnect proxy when rebooting phone
  • Fixed issue: Iptables fails when a hostname is used if the dns lookup returns more than one ip address
  • Added option to disable log
  • Improved log information, to help issue resolution.
  • Added new redsocks binary, with better buffer support

Version 0.2 [19.May.2011]:
  • Fixed FC issues
  • Added SSID/mobile network field in network list
  • Added log option to redsocks (see updated faq)
  • Back button from network list now returns to preferences

Version 0.1 [17.May.2011]:
  • http, https, socks4, socks5, http(s) with ntlm auth supported
  • Multiple proxy settings supported
  • Auto connect to proxy. It will detect your network settings, and connect you automatically when the network is detected (Wifi and Mobile networks)
  • Recognizes a network even through Access Points (APs) with different names
  • ntlm support (not tested with Microsoft ISA or forefront) testers needed!
  • Notifications when proxy is turned on (can be disabled in settings)
  • New, shiny icon.


Known issues:

Planned updates:
  • Support for manually setting Wifi network
  • Apply changes to a connected proxy automatically
  • Allow selection of apps to go through proxy
  • WPAD support (proxy auto-detect)
  • x86 support (on alpha, coming soon!)

Screenshots:




If you want to help translate Autoproxy to your language, you can help at http://www.getlocalization.com/Autoproxy/

Autoproxy is now on the android market, SlideMe Store, Amazon appstore and getjar(lite only). It's $2.95. For all those who have helped in finding bugs, making suggestions or translating, I'll give you a refund on the market if you email me about it.







Lite Version:



Attached Files
File Type: apk AutoProxy_lite_0.75.0.apk - [Click for QR Code] (1.70 MB, 4849 views)
The Following 45 Users Say Thank You to Moronig For This Useful Post: [ Click to Expand ]
 
Moronig
Old
(Last edited by Moronig; 4th November 2011 at 12:21 PM.)
#2  
Senior Member - OP
Thanks Meter 195
Posts: 375
Join Date: Dec 2010
Location: Curitiba

 
DONATE TO ME
Exclamation FAQ/Troubleshooting

Q. The proxy is not starting automatically when I connect to my network, what do I do?
A. The proxy will auto-start when it detects the network that you were connected to when the setting was created. If you were not connected to the right network at the time, you must connect manually to the proxy once. Then the app will remember to autostart when connected to that network from now on. It should show "Associated with 1 networks" (1 or more) in the proxy info.

Q. The proxy is turning on when I'm connected to another network, what goes?
A. Perhaps you were connected to this network when you added your proxy settings? If you open the app and click on disconnect, it will know not to autostart the proxy for this network again. You just need to manually start the proxy

Q. How do I root my phone?
A. There are several ways to do it. Search this forum. I personally used z4root, and I've heard good things about Universal 1-click root.

Q. Is this compatible with my phone?
A. If you have root access, and iptables with nat, it should be. I haven't tested it on anything below android 2.1, though, so report if it works for you.

Q. The app says iptables binary was not found in my rom, what can I do?
A. Maybe your rom does have it, but it's on another path. So try this:
go to a shell (either on your phone or adb)
Type: su (your phone must be rooted)
Type: iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to 8123
Type: iptables -L -n -t nat
If that doesn't work, then you don't have iptables on you rom. Check out this post or PM me and I will try to assist you with this problem.

Q. Market is not working, it hangs at 'Starting Download'. Is there a way around that?
A. Sorry, but I can't help you there. This is often caused by port 5228, used by market to authenticate, being blocked by your proxy. Apparently this causes issues with gtalk as well. You'd have to redirect through somewhere else, using VPN or an SSH tunnel.

Q. I'm getting an error "Failed to start proxy.sh (…) bind Address already in use" when my phone wakes from sleep.
A. This problem was most likely caused by some roms not having killall linked. (Thanks @Misato-chan). Update to version 0.27 or later to fix it.

Q. It's not working for me!
A. Let's try and fix it, post your problem with at least the following:
Problem description
Phone make/model
Android version
Version of the app you're running
Error messages(if any)
Logs: redsocks.log and tproxy.log (can be found on /data/data/net.moronigranja.tproxy/app-logs)
Warning Will contain some private information (eg: ip address of sites you tried to access) so you may email them to me instead of posting here (moronigranja at ymail dot com)
Type of proxy
The Following 4 Users Say Thank You to Moronig For This Useful Post: [ Click to Expand ]
 
wallla
Old
#3  
wallla's Avatar
Senior Member
Thanks Meter 12
Posts: 100
Join Date: Jun 2010
Thank you a lot. I will try it for sure.


One little "bug" I've already discovered:
In preferences, click on "View Networks", then go back via the hardware-back-button. Normally I would expect to get back to the preferences-screen, but instead I land on the main activity.
Motorola Milestone || Stock Elcair 2.1 (not rooted)
Nexus S GT-i9023 || Matr1x 15 CFS || Stock ICS 4.0.3 - rooted
 
ryteng
Old
#4  
Junior Member
Thanks Meter 1
Posts: 6
Join Date: Nov 2009
Hi Moronig,
Good Job!! Finally your version work for me!! Thank you very much!
Perhaps previous version by daveba might work, I followed your guide in http://forum.xda-developers.com/show...766569&page=76 Post #752. with your version and the magic happen! You should include the iptables issues in your FAQ since many phone doesnt come with it.

BTW, I am testing with China tablet M701 Telechip TCC8902 base. Gingerbread 2.3.1. Browser work, will continue to test Market.

Keep up the good job!

Cheers!
 
Moronig
Old
#5  
Senior Member - OP
Thanks Meter 195
Posts: 375
Join Date: Dec 2010
Location: Curitiba

 
DONATE TO ME
Quote:
Originally Posted by wallla View Post
Thank you a lot. I will try it for sure.


One little "bug" I've already discovered:
In preferences, click on "View Networks", then go back via the hardware-back-button. Normally I would expect to get back to the preferences-screen, but instead I land on the main activity.
Thanks walla. I will take a look, it will be fixed on the next release.

Quote:
Originally Posted by ryteng View Post
Hi Moronig,
Good Job!! Finally your version work for me!! Thank you very much!
Perhaps previous version by daveba might work, I followed your guide in http://forum.xda-developers.com/show...766569&page=76 Post #752. with your version and the magic happen! You should include the iptables issues in your FAQ since many phone doesnt come with it.

BTW, I am testing with China tablet M701 Telechip TCC8902 base. Gingerbread 2.3.1. Browser work, will continue to test Market.

Keep up the good job!

Cheers!
Good idea, I will do that.
Find my apps: AutoProxy
The Following User Says Thank You to Moronig For This Useful Post: [ Click to Expand ]
 
Valantur
Old
#6  
Member
Thanks Meter 22
Posts: 70
Join Date: Aug 2010
Thanks for taking this project forward.

One small request that I'd like to make is to include a way for assigning proxies depending on the SSID of the network. That feature would allow me to configure different proxies for different networks beforehand, and also is less traumatic if the network changes the ip address and gateway that assigns to each connection.

Thanks!!
 
ivkom
Old
#7  
ivkom's Avatar
Junior Member
Thanks Meter 1
Posts: 5
Join Date: May 2011
Location: Mirny
Goo job!
But not all apps working, for example Market..
 
XZQ't
Old
(Last edited by XZQ't; 18th May 2011 at 10:12 AM.)
#8  
Senior Member
Thanks Meter 11
Posts: 130
Join Date: Jan 2010
It's not working for me. Here's the information.

Problem description : internet not working - all apps
Phone make/model : Samsung Galaxy S II , rooted, kernel version XWKE1
Android version : 2.3.3
Version of the app you're running : 0.1
Error messages :



Logcat trace : http://pastebin.com/BYf3PvcZ
Type of proxy : http without authentication
 
ryteng
Old
#9  
Junior Member
Thanks Meter 1
Posts: 6
Join Date: Nov 2009
Quote:
Originally Posted by ivkom View Post
Goo job!
But not all apps working, for example Market..
It works on My Gingerbread. Browsing and downloading no problem at all.
 
blakeg
Old
#10  
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Mar 2011
Location: Liberty Center
Quote:
Originally Posted by ryteng View Post
It works on My Gingerbread. Browsing and downloading no problem at all.
This proxy rocks. It works perfectly with all my apps (including Market) on my NookColor running CM7.1 (2.6.32 kernel beta3.1).

Tags
iptables, network, ntlm, proxy, socks
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes