Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: POE Stream Proxy

by rcaputo (Chaplain)
on Mar 01, 2009 at 18:16 UTC ( [id://747330]=note: print w/replies, xml ) Need Help??


in reply to POE Stream Proxy

You're welcome to try one some friends and I hacked together a few years ago: http://thirdlobe.com/svn/web-proxy/trunk/

It's not my greatest or most efficient code (patches welcome), and it includes some features you probably don't need, but it's a web proxy, it uses POE, and it handles multiple connections and streaming.

Sample console output from your URL:

perl shproxy.pl <P> Starting web proxy 'proxy-section' on port 1888. <P> Entering main loop. >>>>>>>>>>>>>>>>>>>> GET http://193.68.124.87/axis-cgi/mjpg/video.cgi?camera=1&resolution=3 +52x288 HTTP/1.0 Cache-Control: no-cache Pragma: no-cache Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image +/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0 Accept-Language: en,fi;q=0.9,fr;q=0.8 Host: 193.68.124.87 User-Agent: Opera/9.51 (Macintosh; PPC Mac OS X; U; en) Proxy-Connection: Keep-Alive >>>>>>>>>>>>>>>>>>>> <P> Request: http://193.68.124.87/axis-cgi/mjpg/video.cgi?camera=1&res +olution=352x288 <P> Fetching: http://193.68.124.87/axis-cgi/mjpg/video.cgi?camera=1&re +solution=352x288 <<<<<<<<<<<<<<<<<<<< HTTP/1.0 200 OK Cache-Control: no-cache Connection: close Pragma: no-cache Content-Type: multipart/x-mixed-replace; boundary=--myboundary Expires: Thu, 01 Dec 1994 16:00:00 GMT <<<<<<<<<<<<<<<<<<<< Chunk of 1428 octets. Chunk of 1428 octets. Chunk of 1428 octets. Chunk of 1428 octets. Chunk of 1428 octets. Chunk of 1428 octets. Chunk of 1428 octets. ^C

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://747330]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2024-04-25 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found