Does ruby have an http proxy

Hi guys!

Is there an http proxy module that could be used ? For example , I would
like to point my browser through it and filter some web content using my
proxy. I know the same thing could be done using greasemonkey and the
like , but I would like to know if it can be done with ruby .

Thanks

Lex W. wrote:

Hi guys!

Is there an http proxy module that could be used ? For example , I would
like to point my browser through it and filter some web content using my
proxy. I know the same thing could be done using greasemonkey and the
like , but I would like to know if it can be done with ruby .

Webrick does this nicely. See sample/webrick/httpproxy.rb in the ruby
source distribution.

Lex W. wrote:

Hi guys!

Is there an http proxy module that could be used ? For example , I would
like to point my browser through it and filter some web content using my
proxy. I know the same thing could be done using greasemonkey and the
like , but I would like to know if it can be done with ruby .

Thanks

require ‘net/http’

Net::HTTP::Proxy(proxy_addr,proxy_port)::start(“www.google.com”)
{ |http|
h,b=*http.get(“/”)
p h
p h.to_hash
puts b
}

Thomas B. wrote:

require ‘net/http’

Net::HTTP::Proxy(proxy_addr,proxy_port)::start(“www.google.com”)
{ |http|
h,b=*http.get(“/”)
p h
p h.to_hash
puts b
}

Isn’t that a client?