HTTP Proxy instruction?

B

Ben Weeks

I'm looking to create a proxy that will scrape all my http headers and
post them to stdout. My searches have been vacant on this topic, does
anybody know of any good tutorials out there?

-Ben
 
J

Joel VanderWerf

Ben said:
I'm looking to create a proxy that will scrape all my http headers and
post them to stdout. My searches have been vacant on this topic, does
anybody know of any good tutorials out there?

One place to look is the httpproxy.rb that comes with webrick in the
standard ruby libs. No tutorial AFAIK, but it's fairly simple code.
 
F

Francis Cianfrocca

[Note: parts of this message were removed to make it a legal post.]

I'm looking to create a proxy that will scrape all my http headers and
post them to stdout. My searches have been vacant on this topic, does
anybody know of any good tutorials out there?



Do you need a forward proxy or a reverse proxy? Does it need to be
transparent (which would require some kind of address translation) or do you
want the ordinary HTTP-proxy kind?
 
G

GOTO Kentaro

I'm looking to create a proxy that will scrape all my http headers and
post them to stdout. My searches have been vacant on this topic, does
anybody know of any good tutorials out there?

Try this one-liner,

% ruby -r webrick/httpproxy -e 's = WEBrick::HTTPProxyServer.new:)Port
=> 9999, :RequestCallback => Proc.new{|req,res| puts req.request_line,
req.raw_header}); trap("INT"){s.shutdown}; s.start'

webrick/httprequest.rb defines APIs of a req object.


HTH

Gotoken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,277
Messages
2,571,385
Members
48,087
Latest member
DomenicGib

Latest Threads

Top