http://qs321.pair.com?node_id=747330


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