does ruby have an http proxy

This is a discussion on does ruby have an http proxy within the RUBY forums in Programming Languages category; 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 -- Posted via http://www.ruby-forum.com/ ....

Go Back   Application Development Forum > Programming Languages > RUBY

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-28-2008, 02:27 AM
Lex Williams
Guest
 
Default 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
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #2  
Old 08-28-2008, 02:53 AM
Joel VanderWerf
Guest
 
Default Re: does ruby have an http proxy

Lex Williams 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.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Reply With Quote
  #3  
Old 08-28-2008, 03:27 AM
Thomas B.
Guest
 
Default Re: does ruby have an http proxy

Lex Williams 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("ww w.google.com")\
{ |http|
h,b=*http.get("/")
p h
p h.to_hash
puts b
}
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #4  
Old 08-28-2008, 12:04 PM
Joel VanderWerf
Guest
 
Default Re: does ruby have an http proxy

Thomas B. wrote:
> Lex Williams 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("ww w.google.com")\
> { |http|
> h,b=*http.get("/")
> p h
> p h.to_hash
> puts b
> }


Isn't that a client?

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:36 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.