I worked on it and released a patch to add the Chunked-Encoding support (disabled by default):
# Start tunnel, with chunked encoding
e32.start(‘htc60.exe’,
‘-C -F 5900 -U "Nokia N70-1" ‘
‘-P <proxyIPaddress>:8080 myserver.dyndns.org:80′)
Hurraaa !!!
it worked as expected (VNC+ on my E90):
But the party isn’t over yet : mobile internet, especially through proxies, isn’t so reliable : network loss, roaming, or congestion may happen.
Moreover, data helds by proxies may not be delivered in such cases, while considered as is from the client point of view.
That’s why a transport layer must be implemented in top of the tunnel protocol, able to handle reconnections, and to detect and resend any lost packet (using acknowledgement for example). Reliability at cost of little bandwidth.
I implemented this feature as option (disabled by default):
# Start tunnel, chunked and acKnowledgement with 1500ms retry
e32.start(‘htc60.exe’,
‘-C -K -R1500 -U "Nokia N70-1" ‘
‘-F 5900 -P <proxyIPaddress>:8080 myserver.dyndns.org:80′)
That’s it ! Our tunnel is almost ready. Since I planned to publicly expose my port 80, an authentification mechanism is required : HTTP 1.0 define a Basic Authentification scheme, not really secure (the login/password is base64 encoded in headers), but enough for our application. Any unauthorized connection will receive an HTTP 401 message.
The implementation tooks few hours, but needs adding (basic) Cookie support since some proxies use them to keep track of authentification :
# Start tunnel, with authentification
e32.start(‘htc60.exe’,
‘-C -K -R1500 -U "Nokia N70-1" -a mylogin:passwd’
‘-F 5900 -P <proxyIPaddress>:8080 myserver.dyndns.org:80′)
And voila ! ![]()



23 comments so far
Hi Biloute,
Good job !
You write weirdly, you’re cockeyed
It isn’t Ch’ti Mi language. I don’t understand !!!
You don’t drink the good beer.
A Nosteke !
April 1st, 2008 at 9:33 pm
[...] | GNU HTTP Tunnel for S60 trackback ¿Recomendarías este post? Más noticias sobre: Desarrollo, Aplicaciones [...]
April 9th, 2008 at 11:47 am
Quick question, did the proxy used by the network operators allow for https connections or not?
April 19th, 2008 at 9:08 pm
Quick answer: yes.
I heard about the CONNECT method, but this hack isn’t working in most cases.
April 20th, 2008 at 8:54 pm
The new features that you have developed are very interesting. Have you presented your work to Lars Brinkhoff? He maybe interested!
October 14th, 2008 at 9:05 pm
I did, but I never get an answer…
October 15th, 2008 at 8:39 am
Hum … might need to try again
May I suggest new features:
- On the client side:
. the possibility for users to specify a prefix to the URL of the POST requests
. the possibility for users to pass a list of cookies (a bit like curl –cookie )
[WEBMASTER: done !]
Indeed, some http-proxy (e.g. web appliance cisco 3000) rewrite on the fly URLs of http document they relay, and install their own cookies…
- On the server side:
. integrate a mini-html file server, in response to GET requests. The final idea would be to offer the client as a Java applet (as Xvnc -httpd ) (I believe it would fundamentally not possible that hts be launched by an HTTP server as a cgi. We should do the opposite.)
Regards
October 15th, 2008 at 3:08 pm
doesnt work on n95 8gb? everythings installed but when i click on the icon it shuts right down. please help! i’ve been searching for a http tunnelling program for my n95 that actually works for over a week now. thanks! nice blog btw.
October 31st, 2008 at 2:46 am
It should work on N95 too ! To make the GUI works, you first have to install Python for S60, OPEN C librairies (PIPS & Glib), and of course the GNU HTTP Tunnel client binary. Do you ?
October 31st, 2008 at 9:22 am
yes i did install everything. i already had pips and pipes installed from another program. i downloaded the others from here. it acts like it was to start; ie: screen flickers like its changing to the application. then it just goes back to the applications menu. im going to continue messing with it. this is the second port forwarding app i have found that looks promising. but also the second that i havent been able to even run properly. it sucks that putty doesnt support port forwarding. thanks!!
November 1st, 2008 at 2:38 am
Hi,
After some fiddling, I got your patched HTTPTunnel client/server to compile under MacOS X.
The original, unpatched HTTPTunnel source did compile, but after patching it, it didn’t, it returned the error: “Undefined symbols: _strndup”
I don’t know much about C, but I googled for a solution and found this related bug on other app: https://savannah.gnu.org/bugs/?24380 so after adding that code to tunnel.c, it compiled properly.
You can get the patch file (apply it to the already patched HTTPTunnel from the patch of this post) here:
http://dl.getdropbox.com/u/255615/patch-httptunnel-osx
And, some already compiled binaries, Intel-only AFAIK (I don’t know how to make universal binaries):
http://dl.getdropbox.com/u/255615/httptunnel-3.0.5-patched-osx.zip
To compile, after applying both patches, run:
./configure; automake -a -c; make
(requires XCode installed)
Now I’ll just wait until I get my N73 to try the Symbian part
November 1st, 2008 at 12:32 pm
I am sorry but i have the same problem on my N95-8GB.
It seems to be from the line number 3.
“Import threading” doesn’t work. I think a library is missing.
November 2nd, 2008 at 9:24 pm
Thank you for reporting. I added the missing module to the installer. First uninstall the previous release, and it works now ! Even on N95
Apologize
November 3rd, 2008 at 10:40 am
works for me! thanks renaud!
November 3rd, 2008 at 11:56 pm
I’m trying to use it to connect over my carrier’s proxy, but for some reason the requests don’t go through:
16:37:50 creating a new tunnel?
16:37:50 tunnel_setopt keep_alive error: Invalid argument?
16:37:53 tunnel_in_setsockopts: non-fatal SO_RCVLOWAT error: (null)?
16:37:53 tunnel_out_setsockopts: SO_RCVLOWAT: 1?
16:37:54 tunnel_in_connect: HTTP error 502?
16:37:54 http_error_to_errno: HTTP error -502?
16:37:54 couldn’t open tunnel: Input/output error?
16:37:54 exit with status = 1
It seems that the proxy doesn’t like Keep-Alive requests and bounces them (running a sniffer shows no packets at all directed to the server). But even disabling -K option from being passed to htc (modified the Python code to do this), it still shows “keep-alive: 5″ on the debug log… Can you try to fix this, so I can use htc without keep-alive?
BTW, parameters that were used: -L 127.0.0.1:514 -D 3 -U “N73″ -F 83 -P (carriersproxy):8080 (myhost):8000
Oh, the GUI didn’t work directly, I had to extract the .sis and run the .py file directly using the Python interpreter and it works then
November 7th, 2008 at 4:51 pm
First of all, your User-Agent is not a valid one. Why do you change it ? Use a valid one, like the “Nokia N70-1″ or any mobile User-agent.
Secondly, if you’re using a proxy, there’s a LOT OF CHANCE that it will let you remotely connect ONLY on port 80: don’t use port 8000 for your server !
Third, “-K” switch IS NOT keep-alive. Don’t mess with python source code. Please.
Fourth, what are the options you used for server ?
Fifth, please read and understand carefully how HTTP tunnel works. You seems to not fully understand how things works.
November 7th, 2008 at 6:31 pm
Hi,
I changed the User-Agent just to try, the Nokia N70-1 original one does not work, either.
The proxy does let me connect on other ports than 80, I use, for example, port 11997 for connecting to IRC by using jmIRC (http://jmirc.sourceforge.net/) to login to IRC.
I thought the -K switch was for Keep-Alive, sorry, I was trying to use your HTTPTunnel without the additions you had made (i.e: chunked encoding) to try to find what makes the proxy I have to go through to bounce the connections. My provider’s proxy is not a normal HTTP proxy but a WAP proxy, it works as a HTTP proxy indeed but some headers just don’t work (301 Redirections recieved from the HTTP server, for example) and just return a 502 error. CONNECT requests don’t work, either.
After reading about HTTPTunnel, there doesn’t seem to be a way of disabling Keep-Alive request.. so i’ll keep fiddling around to see why does the server bounce the tunnel requests. Once I get to connect my N73 to my Mac as a modem, I’ll try to connect from it and use the standard HTTPTunnel and see if the requests pass through.
I tried a lot of server switches, but they don’t matter if the connection doesn’t pass through, as the sniffer tells me it doesn’t (no activity on the port I’m listening on).
November 7th, 2008 at 6:57 pm
By the way, WHY do you need to use GNU HTTP Tunnel if your gateway let you connect to others ports/protocols than 80/HTTP ???
November 8th, 2008 at 11:19 am
You can’t connect anywhere using just the gateway; you have to connect using a specific HTTP proxy (that is the cause of the problems) that only lets you connect to any port but only if you are using the HTTP protocol (GET/POST requests).
I finally got some HTTPTunnel traffic to go through the proxy, but it still doesn’t work - I’ll keep trying with different options.
November 8th, 2008 at 7:30 pm
All is ok for me, great software !
A very big and fabulous developpement !
November 9th, 2008 at 7:49 pm
I have problem on my n95 8gb.
When i try to install httptunnels60.sisx and httptunnelGUI.sisx, It display an error message that informs me that certificates are not valid, and setup is aborted. I respected the steps by installing first Python for s60, pips_s60_wp.sis and openc_glib.sis. Does anybody can help me?
Thanks
November 13th, 2008 at 5:52 pm
Go to “Application Manager->Options->Settings” and check that “Software Installation” is set to “All”.
(BTW, your contact email is not valid)
November 14th, 2008 at 9:03 am
Hey,
This is just great you did this !
Next step is to make a wlan server to use the laptop
However, I can’t run the GUI, it just stops right after beeing run like with n95 above. I reloaded your latest version and uninstalled the previous one before installing. I have a n81-3 (os9.1 like n95) with python 1.4.4 (and opencglib+pips). What did I miss ?
BTW are the GUI sources available for download (so to try and dig what happens)
Thanks for all this
November 20th, 2008 at 2:54 am
Leave a Comment