Skip to content

Instantly share code, notes, and snippets.

@cloudqubes
Last active December 14, 2022 00:20
Show Gist options
  • Save cloudqubes/726df75a1c32c65b266a796e7bb95b91 to your computer and use it in GitHub Desktop.
Save cloudqubes/726df75a1c32c65b266a796e7bb95b91 to your computer and use it in GitHub Desktop.
Ruby Web proxy
require 'webrick'
require 'webrick/httpproxy'
proxy = WEBrick::HTTPProxyServer.new Port: 8000
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