Skip to content

Instantly share code, notes, and snippets.

@ianballou
Created November 22, 2022 19:14
Show Gist options
  • Save ianballou/95174a4361db42a65b540e54db2b05e9 to your computer and use it in GitHub Desktop.
Save ianballou/95174a4361db42a65b540e54db2b05e9 to your computer and use it in GitHub Desktop.
Ruby HTTP proxy
#!/usr/bin/ruby
require 'webrick'
require 'webrick/httpproxy'
proxy = WEBrick::HTTPProxyServer.new Port: 8777
trap 'INT' do proxy.shutdown end
trap 'TERM' do proxy.shutdown end
proxy.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment