Go Back   Wireless and Wifi Forums > Cellular Communications > US Networks > alt.cellular.verizon
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2007, 07:38 PM
Dan Lenski
Guest
 
Posts: n/a
Default HTTP proxy server for Motorola E815 phone in Python

Hi all,
I've recently written an HTTP proxy server for the Motorola E815 cell
phone, based on Suzuki Hisao's "Tiny HTTP Proxy" (http://
www.okisoft.co.jp/esc/python/proxy/). This cell phone allows free
Internet access if you change the default proxy server, but it has a
severely buggy HTTP client implementation which will freeze if there's
no Content-Length header. Basically, it's impossible to read normal
web pages without some massaging of the headers.

So my proxy adds the correct Content-Length header and tweaks the
response in a couple of other ways. It works great now, you can get
the code from: http://tonquil.homeip.net/~dlenski/cellphoneproxy/
I've MIT licensed it. It works fine as a proxy for a "normal" web
browser too!

One of the things I had trouble with was getting decent speed out of
this proxy. The original "Tiny HTTP Proxy" didn't support persistent
connections... which seriously slows down web browsing with a proxy,
since it essentially DOUBLES the number of TCP connections that need
to be made for each page access. So my proxy *does* support
persistent connections, using the standard Connection or non-standard
Proxy-Connection headers to determine whether to keep the connection
alive or not.

It's still not perfect though... apparently sometimes a web browser
will SAY that it wants to keep a connection alive, and then just drop
it. The proxy normally runs in a multi-threaded mode, and it counts
the number of times that each connection is reused, printing this when
the RequestHandler.finish() method is eventually called. If I force
the proxy to run in a single thread, and use it as a proxy for
Firefox, it will freeze up after a few page requests... the proxy will
wait around for a new request on the same socket that never comes.

So, my question is... is there any way to improve on this? Is there a
way to make BaseHTTPRequestHandler detect when its connection has been
closed by the peer without waiting for a long timeout? Is there a way
to get the browser to always reuse a connection when it says it's
going to? Any advice on improving the code is appreciated!

Thanks,
Dan Lenski


Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
W-isp billing and proxy server software raytaylor Members Lounge 5 12-20-2007 11:36 PM
Default home page for those without proxy server settings kasumi0044@yahoo.com.hk comp.security.misc 4 10-31-2005 08:11 AM
[SSL-Talk List FAQ] Secure Sockets Layer Discussion List FAQ v1.1.1 Shannon Appel comp.security.misc 0 10-19-2005 04:37 AM
[SSL-Talk List FAQ] Secure Sockets Layer Discussion List FAQ v1.1.1 Shannon Appel comp.security.misc 0 08-30-2005 04:26 AM
[SSL-Talk List FAQ] Secure Sockets Layer Discussion List FAQ v1.1.1 Shannon Appel comp.security.misc 0 07-31-2005 04:25 AM


All times are GMT. The time now is 06:07 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45