in reply to IO::Socket for HTTP Proxy

Just use socat, and ignore Perl for this:
socat TCP4-LISTEN:9999 TCP4:otherhost:8888
proxies local port 9999 to remote port 8888. Too easy.

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Replies are listed 'Best First'.
Re^2: IO::Socket for HTTP Proxy
by r1n0 (Beadle) on Sep 30, 2009 at 20:22 UTC
    Randal,

    Thank you for the response. I would love to use the socat program for such, but this is a test I am running for a bigger picture. I already have an archive that I accessible through an IO::Socket proxy server I have written. Right now, it will only dish out resources that are within the archive. If a requested resource is not within the archive it allows a user to task the resource for collection. I want to provide a method for an excluded list of IP addresses to bypass the archive and go straight to the web through the same proxy server. These excluded systems will be allowed to browse without exclusion or limitation. This is why the code I provided uses IO::Socket for both sides. The code already written uses an IO::Socket server setup as a proxy (for what is in archive), and figuring out how to create the passthrough proxy capability with IO::Socket will prevent me from rewriting a lot of code. I have used socat before and like it for what it is.

    Thanks.