Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

BooK (2612)

BooK
  {book} {at} {cpan.org}
http://paris.mongueurs.net/
Yahoo! ID: philippe_bruhat (Add User, Send Message)

Obfuscation [plover.com]. Pink [axis-of-aevil.net]. HTTP::Proxy [cpan.org]. YEF [yapceurope.org]. Fishnet [perl.org]. Kapow [cpan.org]. Cog's [perl.org] bitch [cpan.org]. Invitation [perl.org]. White [perl.org] Camel [perl.org]. Nuff' said.

Journal of BooK (2612)

Tuesday January 10, 2006
10:51 AM

Net::Proxy

[ #28303 ]

After toying with the idea during most of the holidays, and going through various class hierarchies and implementation scenarios, I finaly managed to have a working implementation of Net::Proxy. (As you'll see, it's not related to HTTP::Proxy, except for the name similarity.)

Net::Proxy introduce the concept of connectors (implemented as Net::Proxy::Connector objects). A Net::Proxy object is made of an in connector waiting for incoming connections on the proxy and an out connector that contacts a remote host. The proxy passes data back and forth between the sockets managed by the connectors.

These connectors let me abstract various encapsulation protocols on top of regular sockets. The first one is the classic HTTP CONNECT, already implemented in my connect-tunnel script (which I've rewritten using Net::Proxy and included in the distribution). Other connectors will follow.

As an added bonus, this all works perfectly under Win32. And the test suite covers about 93% of the code!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.