Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Proxy in Perl

by arthas (Hermit)
on Jun 02, 2003 at 13:09 UTC ( [id://262357]=note: print w/replies, xml ) Need Help??


in reply to Proxy in Perl

You'll have to open a connection with port 80 (or whatever port it listens) of your proxy sever. The Socket module will do that for you. After that, you'll just need to request the page you want to the proxy, by sending it a string such as:
GET http://www.siteyouwant.com/pageyouneed.html HTML/1.1
The proxy will look into its database if it has a current copy of the page, otherwise it will request it to the web server. Then, the page will be served to your client over the connection you created.

Michele.

Replies are listed 'Best First'.
Re: Re: Proxy in Perl
by Anonymous Monk on Jun 02, 2003 at 13:23 UTC
    Hi Michele. The proxy that I am using works a little differently as it does not store anything locally to the box. It works more like a stateful inspection firewall. The request gets sent to the proxy (firewall) and then the proxy checks to see if its ok to send the request out to the "wild." I tried using the LWP:PROXY module which worked fine but I want to manipulate some of the TCP/IP packet information for some experimental purposes in which case the LWP module is not sufficient. Hopefully this is enough information (and its clear). Again, any help is appreciated.

      manipulate some of the TCP/IP packet information
      I hope this helps:

      NetPacket::TCP
      Assemble and disassemble TCP (Transmission Control Protocol) packets.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-19 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found