Guest User

Untitled

a guest
May 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. require 'webrick/httpproxy'
  2. require 'uri'
  3. s = WEBrick::HTTPProxyServer.new(
  4. :Port => 8080,
  5. :ProxyContentHandler => Proc.new{|req,res|
  6. puts "-"*70
  7. puts res.body.class unless res.body == nil
  8. puts "-"*70
  9. }
  10. )
  11. trap("INT"){ s.shutdown }
  12. s.start
Add Comment
Please, Sign In to add comment