It's using something called WEBrick. It's a "default gem", so it sounds like it comes with Ruby.
"WEBrick is an HTTP server toolkit that can be configured as an HTTPS server, a proxy server, and a virtual-host server."
So I'm reading it as 100 loc of setup to use a proxy toolkit to invoke a proxy.