Created
November 22, 2022 19:14
-
-
Save ianballou/95174a4361db42a65b540e54db2b05e9 to your computer and use it in GitHub Desktop.
Ruby HTTP proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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