yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] daveba:
Thanks. One good report from all the negative ones is a blessing. So now we have (for 3.05)

Galaxy S - working

Desire CM6 - working

Desire MCR - working
[Desire Android Development] kafkasmaze:
but why would it still crash in http? socks work really fine to me
[Desire Android Development] daveba:
Because the codebase for socks is totally different than for http even though it's one binary. In socks there is no auth. Again, please try 3.05 because your post #419 shows a stack from a bug in the 3.04 version.
[Desire Android Development] STomko:
Hi. Unfortunately, 3.04 as well as 3.05 doesn't work for me.

Let's say 3.05 - start it, enter proxy, press ON - asks for superuser permissions --> allow

Internet doesn't work at all (Page could not be loaded).

I don't have any possibility to make a log (it's in a company, can't install anything on my PC or bring any other to the job) and I have a wifi only there.

But I read that someone else here had the same problem - not working internet. Probably someone can make a logfile...:confused:
[Desire Android Development] kafkasmaze:
i think my log report have been ignored at all....
[Desire Android Development] daveba:
No, see post 404 and 430
[Desire Android Development] daveba:
Are you sure you uninstalled and reinstalled. Looks like the bug i fixed in 3.05 !
[Desire Android Development] slimfady:
Yup,

Cleared data for the app, then uninstalled and then reinstalled. Maybe i'm doing something wrong here?
[Desire Android Development] JurieK:
Any chance that we can get NTLM support??
[Desire Android Development] daveba:
Not until i fix all the bugs with basic auth.
[Desire Android Development] flame10:
Must say 3.05 is working quite wonderfully for me ..

getting market downloads via socks, just the thing which doctor ordered.

Hats off to you and your wonderful efforts .. may you have a wonderful future ahead of you.

Edit: I just voted the thread to the front page, requesting others also to do so if you got helped, this is a major feature request in android, which google has been ignoring till date. Issue Thread at Google projects
[Desire Android Development] asmaridis:
Hello daveba, I just upgraded from 3.02 (which was working) to 3.05 but have noticed that the xda app no longer works. The rest works just fine.

Any reasons behind that?
[Desire Android Development] daveba:
Nope no idea.
[Desire Android Development] daveba:
Ok, i'm at a customer which has a proxy with a backslash username and guess what, it fails for me here too. Luckily i've been snooping and i think i know what's going on. Seem that MS proxy doesn't play nicely with transparent proxies (irrespective if you have a slash or none in your username). I'm working on this...
[Desire Android Development] rfgamaral:
Awesome app! Now I can sucessfully connect and properly use my uni network :) THANK YOU!

For the record, I didn't know about v3.05 until I got here today so it's working for me on 3.04 and haven't tested 3.05 yet.

I want to point out a few things though...

1) Suggestion: Remove the version number from the app name. No other app does this (as far as I can see it and I have a few installed) and it looks really odd on the app listing. Every app is qualified by it's name only and it looks much better.

2) Suggestion: If you possible and whenever possible, a revamp to the UI would be most welcome. Everything is misaligned on my Hero and the UI is very archaic. Of course, this is not a priority since many people are still having problems using it. But it would be nice when you have time :)

3) Suggestion: An on/off widget would be pretty handy to have too. Still, not a priority.

4) Question: Is there any issue on having this in the Market? It would be nice to be able to update the app without always coming here looking for new versions.

5) Question: My uni has 2 proxies, HTTP and SOCKS. When I use my laptop, I mostly use the HTTP proxy everywhere, I rarely use the SOCKS proxy because that's for specific service ports only. However, the HTTP proxy doesn't work for me with Transparent Proxy, the browser doesn't load anything but the SOCKS proxy work just fine. Any reason for this? Maybe nothing in Android is actually using port 80 or 443? Cause only those are allowed in the HTTP proxy around here, everything else should use the SOCKS one.

6) Note: What exactly doesn't work in the Market through a proxy? I was able to browse the Market, read comments and such. Didn't try to download anything yet but I'll try that tomorrow if I don't forget about it.
[Desire Android Development] Iceberger:
3.05 is working for me. Thanks
[Desire Android Development] tehownt:
Check my last post, you can try it, it might work if you only need web browsing, but you'll have to use Fennec.

By the way, congratulations and thank you very much daveba, transproxy 3.05 works flawlessy for me in conjunction with connectbot (SSH Proxy).
[Desire Android Development] Dentxinho:
Hello, folks...

I couldn't make it to work =/

My device is a Milestone with default ROM, and the network i'm trying to access has a HTTP proxy with basic auth.

The steps I followed:

- Installed 3.02;

- Installed Superuser;

... Didn't work because the lack of iptables

- Uninstalled 3.02;

- Installed 3.05;

- Installed iptables as shown at w w w.my digital life.info/2010/05/24/droidwall-iptables-not-found-error-on-rooted-android-motorola-droid-or-milestone/ (I'm sorry, I can't post links yet =P)

... Didn't work

- Uninstalled 3.05;

- Installed it again;

... Didn't work !

Am I missing something? Can you help me please? Thanks
[Desire Android Development] Quemeros:
I try all, and it's imposible to get work this app :(

Try all versions, all with errors.

The last (3.05) give me this error:

[B]Failed to start redirect.sh[/B] (FIXME! implement getprotobyname() bionic/libc/bionic/stubs.c:372
iptables: No chain/target/match by that name FIXME! implement getprotobyname() bionic/libc/bionic/stubs.c:372... and repeat 2 more times.

¿What can i do?

I test MSN Talk and work perfectly, same as with Tor (orbot using bridge)...

PD: I use last Samdroid 2.6.29 / 1.3.1.d
[Desire Android Development] daveba:
Can you run adb and check if you can run the command

iptables -L -n -t nat

. Also it would be helpful if you could tell me what the error message is ? Is it always 'iptables not found' error ? Maybe milestone puts the iptables binary somewhere else ? Transproxy only checks in /system/bin and /system/xbin currently. Let me know if it's different for milestone.
[Desire Android Development] daveba:
Hi, i've fixed some massive bugs in 3.06 (just uploaded). Please try and let me know. Thanks. You must remove previous verison first though before installing 3.06
[Desire Android Development] daveba:
Hi, Thanks very much for the suggestions.

A1) Yes agreed, i will remove it. For the moment i've stopped working on the GUI till i can get the binary working stably. Infact the version number should be in an 'About' screen, but i've just put it on the app name for ease of identification.

A2) Agreed, and see A1 above. Another user has given me a revamped UI which will be integrated as soon as i get bugs ironed out. I used to have a Hero but now only a Desire. Can you PM me with a screenshot as i'm surprised it's so badly misaligned. I thought the layout was pretty much tabular ?

A3) Again someone offered me an on/off widget also 2 days ago.

A4) I'll put on the market once bugs are out.

A5) Can you please check if 3.06 works with HTTP for you ? I think it may be crashing. I fixed some glaring bugs.

A6) I think market downloads don't work (especially thru HTTP proxies) since google uses an AUTH port which is not on 80/443 so b*stard proxies that implement CONNECT block anything but 443 so we can't redirect the auth part when downloads take place. SOCKS typically allows all ports so it should work pretty much flawlessly for you.
[Desire Android Development] Dentxinho:
I'm sorry by forgetting to say what is the problem =P

I'm getting "Page cannot be displayed" on the browser, and the applications cannot access the internet.

Well, I don't have ADB installed, but I've ran the command on Terminal Emulator, here it is:

# iptables -L -n -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 8123
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 redir ports 8124
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5228 redir ports 8124

I'll try with v3.06 tomorrow and see if it works.
[Desire Android Development] ptewee:
3.06 works with gmail, market, tweetdeck, browser, but does not work with youtube, maps (tested with nexus one on CM6)

Update: market is browsable, but cannot download any apps..
[Desire Android Development] flame10:
I'm using socks, market downloads, youtube everything works ... I'm not aware of the fixes of 3.06 over 3.05, but both works for me .. glad for this.
[Desire Android Development] eref:
Same for mee, too.

I think our corporate proxy does not allow more

But at least gmail, weather and browser work. I am very grateful for this version, Daveba.
[Desire Android Development] kieu96:
Hi,

How can I change DNS on my desire ?
[Desire Android Development] STomko:
Hi. I just tested it. It seems better now...

What works: web browsing, gmail app, friendstream (widget), market browsing, weather

what doesn't: market downloading (but it didn't work even earlier), google maps and youtube app (did work earlier), shazam (not a big deal), trillian, skype (those two would be just a plus if it worked, not really needed to get it working :) )

Anyway - thanks for the update. The most important thing - web - works for me, that's the most important feature for me right now.
[Desire Android Development] cibula66:
It works!

At long last it(3.06) works for me. Thanks a lot!
[Desire Android Development] jpicerno:
Sorry, i'm new in android...

But I find an application called Superuser Permissions to run same aplication as root, why I can use this aplication to access as root to run the trans proxy?
[Desire Android Development] daveba:
Why ? With a proxy all web addresses will be resolved by the proxy. You only need the Ip address of the proxy at the very least.

If the question is not related to the proxy, then you need to edit your /etc/resolv.conf file. This is automatically populated by dhcp from your wifi or 3g provider.
[Desire Android Development] daveba:
No the superuser permission application just keeps a cache of all 3rd party apps (like transproxy) that requested super user permissions and whether or not you granted or denied permission to the 3rd party app. You never run apps from it. Either you allow transproxy to run priviliged commands to forward ports or not (i.e. the transproxy will fail then).
[Desire Android Development] daveba:
Ok, so it looks like iptables ran fine, but redsocks crashed. An 'logcat' command will show a stacktrace. Anyhow first try 3.06 first.
[Desire Android Development] amw_jjj:
for 3.06, browser and market worked perfectly. Thanks davaba!

Maps and Skype does not work in my test.
[Desire Android Development] Dentxinho:
I just updated to 3.06.

I forgot to tell an error that occurred and it happened again. Sometimes, (on the first time use always), when I try to turn on the proxy, I get a "Failed to start proxy.sh (Failed to bind. Try later...)" message

logcat after this error shows:

(...)

proxy.sh start type=http host=10.52.152.100 port=8080 auth=true user=raulrbj pass=*****

Error starting proxy.sh (Failed to bind. Try later...)

Calling alert()

(...)

After that, when I return to main menu and come back to Transproxy, it is turned on, but the internet doesn't work.

Is there any way to logcat filtering only Transproxy messages?
[Desire Android Development] ptewee:
is there anyway to start the proxy using sh script?

i tried:

/data/data/com.hasbox.tproxy/proxy.sh start http proxy.mydomain.com 8000 false

but i get

file parsing error at line 14: invalid IP address
file parsing error at line 14: value can't be parsed
file parsing error at line 14: unclosed section

EDIT: yes it works if i use the direct IP address, but is it possible to use the url instead?
[Desire Android Development] arturh85:
3.06 works for me (internet & market, jabberoid only kinda works a little).

3.05 did not work at all for me
[Desire Android Development] mikeones42:
hello, I have 3.06 installed and I entered my proxy server ip address, port number, id and password the hit 'on'. I can see proxy.sh starts and iptables gets updated with 80, 443 and 5228 but I can't browse the net trough the proxy. I don't think the proxy uses NTLM but I am not sure. I can get putty to connect using the same settings I entered into transproxy without having to do anything NTLM specific.

Is there a way to know if the proxy uses NTLM from logcat? Is there anything I should be looking for from the output of logcat?

Thanks
[Desire Android Development] Dentxinho:
looks like you have the same problem that I have.
[Desire Android Development] Iceberger:
Appbrain search causes the proxy to stop
[Desire Android Development] daveba:
I don't understand. Putty (ssh) will connect to a ssh daemon on the proxy so what do you mean you connect via putty using the same settings ?

If everything starts correctly and you still don't get any pages come up then the only way to debug is to do a tcpdump on the proxy server or look at the logs on the proxy, but i don't expect you have access to that right ?

Can you telnet to your proxy and do a http get like so

telnet host port
GET http://www.somewhere.com HTTP/1.0
<press return twice - i.e 2 blank lines after the previous one>

what do you get ? Any interesting from the proxy ?
[Desire Android Development] daveba:
You should have got a stack trace if it crashes. Please send me the logcat when it crashes. You should have 4 lines with the program counters i need to debug.
[Desire Android Development] Dentxinho:
More input:

None of the sites of my intranet can be accessed through the proxy, it gives a squid DNS error: "Name Error: The domain name does not exist".

Well, maybe good news, I get this error on my device.

But, if i try on my device to access a domain that doesn't exist, say, asd.efg, it gives "Page cannot be displayed" error, despite my PC gets the DNS error.

May the problem be on the proxy, not allowing mobile connections, maybe?
[Desire Android Development] daveba:
I guess page cannot be displayed is that it's not getting a response from your proxy... Do you know how to run adb commands from your laptop on the phone ? I can send you a debug binary with verbose messages on and we can trace the http flow. Please PM me.
[Desire Android Development] mikeones42:
I guess I am SOL for now... Unless this proxy accepts connect even tough it says NTLM. Thanks for looking.

HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: NTLM
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Proxy-Connection: close
Set-Cookie: BCSI-CS0ACD9796=2; Path=/
Connection: close
Content-Length: 813
[Desire Android Development] daveba:
Don't fret, NTLM is on the cards. I've got httauthd in the pipeline waiting to go.. It's just a matter of what i tackle next, the GUI or NTLM (that's a rhetorical question not intended for you) ?
[Desire Android Development] boliveira2:
I am using version 3.06 on my Galaxy S using rom JM9 and the youtube app finally works. However when I try to install anything from the market, it gives me the same error you have ("OpenSSLSocketImpl: Unknown error 5 during connect")
[Desire Android Development] Dentxinho:
OMG.

I'm under NTLM. This was taking hours of my day, and the problem is such a little: I can't use Transproxy yet =~

HTTP/1.0 407 Proxy Authentication Required
Server: squid/2.6.STABLE5
Date: Tue, 19 Oct 2010 16:02:07 GMT
Content-Type: text/html
Content-Length: 1289
Expires: Tue, 19 Oct 2010 16:02:07 GMT
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
Proxy-Authenticate: NTLM
Proxy-Authenticate: Basic realm="XXXX Proxy Server"
X-Cache: MISS from proxy
X-Cache-Lookup: NONE from proxy:3128
Via: 1.0 proxy:3128 (squid/2.6.STABLE5)
Proxy-Connection: close

Thanks daveba. I'm waiting for your NTLM-supported version :)
[Desire Android Development] daveba:
Thanks for the stack. I've fixed this in 3.07.. See first post.
[Desire Android Development] daveba:
Hmmm, this is not a crash but some taskkiller probably killing processses. In the second output it kills the 'su' program which is not the fault of tproxy. Have you got some aggressive app killer or are dunning out of memory ?
[Desire Android Development] daveba:
Thanks, I will test this myself. Can you try 3.07 please.
[Desire Android Development] daveba:
As mentioned several times before, unless your web proxy allows ports other than 443 via CONNECT method, you will NOT be able to do market downloads as google uses AUTH on a private non-web (80/443) port. So unless you're using SOCKS, this will most likely not work for 99% of the corporate/campus proxies. I have my own proxy setup for testing purposes which allows all ports thru 443 and transporxy works perfectly for me. So it is not a limitation of the program, but of your upstream proxy.
[Desire Android Development] daveba:
Yes 100% right. It's the proxy's job to do DNS resolution of sites since most environments don't provide external name resolution inside the local network, so the upstream proxy resolves all addresses.

Also it seems as if others seem to have no issue with Youtube so maybe it's a transient failure in your net ? It also works for me.
[Desire Android Development] daveba:
Ok, i've uploaded 3.07 and tested appbrain downloads and youtube and both work fine for me. Please uninstall and reinstall as it has a new redsocks binary.
[Desire Android Development] boliveira2:
Thanks for clarifying! And a big thank you for the program, it's really helpfull :)
[Desire Android Development] Dentxinho:
Yes, I figured out this while watching the logcat activities

See my last post. I'm under NTLM =/

Thanks anyways =]
[Desire Android Development] daveba:
Ok, i missed that. Was answering to too many posts there ;-(

It seems i have a new GUI from a kind user, so the next version will be much more polished. I will release 3.08 with an updated GUI within the next day, and then will start looking into NTLM (but no promises since i can't really test out NTLM)
[Desire Android Development] rfgamaral:
Could you also remove the version number from the app's name? It's not consistent with Android.
[Desire Android Development] daveba:
I did that already in 3.07.
[Desire Android Development] rfgamaral:
Didn't notice that update lol, thanks.
[Desire Android Development] daveba:
Beta version 3.08 with the new GUI is out. Please report GUI glitches or other bugs.

SOCKS users will notice that i'm redirecting all traffic thru the proxy now.
[Desire Android Development] trotskyite:
Thanks so much for this app.

Just rooted HTC Desire with Unrevoked3, installed Transproxy3.08 beta, easy to set proxy ip and port and I now have wireless access at work.

Brilliant job.
[Desire Android Development] sharky34:
Hi,

I tried your stuff and I get http and https through the browser. Even, GenieWidget.

But GTalk fails to authenticate with something like:

10-20 18:38:51.690: ERROR/CheckinTask(8395): Checkin failed: https://android.clients.google.com/checkin (request #0)

10-20 18:38:51.690: ERROR/CheckinTask(8395): java.net.UnknownHostException: android.clients.google.com

So every Google app fails: no Gmail, no sync, no maps, ...

Any idea?
[Desire Android Development] mikeones42:
I am happy to test NTLM if needed. :D
[Desire Android Development] daveba:
Hmm strange. It looks clearly like DNS failure (that the unknown host exception), but the hostname should get resolved by the proxy. Are you sure the proxy is running ?
[Desire Android Development] Dentxinho:
Then, we are 2 =)
[Desire Android Development] fonix232:
The GUI is crappy I know (I made it in ten mins, sorry), and I am already working on a new one, similar to the tether apps, and also a nice options menu.
[Desire Android Development] daveba:
Still miles ahead of the rubbish i came up with. To my defense, this whole endeavor was my first foray into graphical programming and i'm no designer (as most of you could tell). Fonix232, do us proud now and come up with something stunning while i work on NTLM...
[Desire Android Development] fonix232:
I'm done with the options menu, and for that I would like to have a request:

custom forwarded ports. I made a little submenu for that already.
[Desire Android Development] sharky34:
In our company (I don't think that it is an exception) the proxy is used for browsing. DNS is broadcasted by inside DNS server, no? Perhaps, the inside DNS uses proxy to request outside DNS but it is not the problem of any inside client.

Anyway, DNS requests are not http requests (or even https), is it? If so they are not routed through the proxy by iptables.
[Desire Android Development] mitiok2002:
Perfect application! Thanx.

all I need - control widget for switch it on/off. Or, it would just perfect, the app should track my current wi-fi connection and switch proxy on or off based on connection name.
[Desire Android Development] fonix232:
Just like my idea for AOSP - an advanced connection manager. With what you can set up custom static IPs, proxy, etc. Similarly like in Symbian.
[Desire Android Development] ahmed_as8:
Thank you finally transparent proxy is working fine on my Legend after alot of searches about proxy issue

good job man :)
[Desire Android Development] daveba:
Ok, done. No probs, but it won't work unless your proxy let's you forward custom ports. So it will give people a false sense that it will work.
[Desire Android Development] daveba:
No, with a Proxy, DNS request are done by the proxy server since you send a 'GET http://www.someplace.com/foo.html" to the proxy so the someplace.com gets resolved there. And yes, i do lnow DNS request are not HTTP requests. And no, DNS requests are NOT routed thru to the proxy. But read my previous comment.
[Desire Android Development] daveba:
Lot's of people asked for this. I'm gonna create a listener on port 8000 that will listen to local requests to turn on/off the proxy. They other developers can just use whatever API to connect to this port and send an on/off request.
[Desire Android Development] fonix232:
I meant forwarding, what you did - to open/redirect ports so everything can work. Now I'm struggling on my tablet, as I can't use torrent, as it can't connect through proxy :S
[Desire Android Development] daveba:
Again, your proxy must support it. I suggest using a VPN instead. You can however change the redirect.sh script in the latest version to do what you want. Just copy the "socks" section to the "http" one and restart the proxy.
[Desire Android Development] mezdup:
does this work with any phone? i have a Droid X. it seemed to install fine. if this allows me to use the wifi at my college i will be forever grateful.
[Desire Android Development] fonix232:
I may try adding a widget when I'm done with the GUI part!
[Desire Android Development] daveba:
Ok NTLM users, you need to be 'adb' savvy to help or else get savvy otherwise i can never get this to work as i don't have access to a NTLM server. So download the following zip and do the steps below (first unzip on your computer):

adb push cntlm /data/local
adb push wget /data/local
adb shell
cd /data/local
chmod 700 cntlm wget
./cntlm -v -u username -p password -d domain -l 8100 proxyhost:proxyport

Substitute user/pass/domain/proxyhost/proxyport as appropriate. If your username has backslashes in it, then you need to single quote the username (like -u 'foo\bar').

Then open another shell onto the phone and do the following

adb shell
cd /data/local
http_proxy=http://localhost:8100 ./wget -O- http://checkip.dyndns.com

If this last wget command gives you the IP address of your proxy then the NTLM proxy worked and i can implement (chain) this in transproxy. You can use control-c to terminate cntlm in the first window above.