webrick snippets

Simple Webrick proxy.

Tagged ruby, webrick, proxy  Languages ruby

A handy oneliner which I found here.

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'