Azure Container Instances as SOCKS proxy

view gist on github

November 30, 2018
gist

Azure Container Instances as SOCKS proxy

Sometimes it’s useful to originate traffic from a specific region - etc to test global load balancers, DNS, etc. A common way to do this is to SSH to some remote VPN service or VM, then forward your traffic through that remote endpoint.

You can also use this to watch Netflix outside of your current country while traveling abroad :P

Azure Container Instances are a quick & easy way to do this as well - launch the ssh daemon in a container, expose port 22, and start forwarding traffic!

Check out the regions you can forward traffic on the Products available by region page

How to use

Follow the steps in proxy.sh

Why this is a gist

I’ve not changed the default root:root password, and I’m exposing port 22. Please secure your ssh daemon and don’t use this as-is in a production environment

Extra credit

You probably don’t want to leave your proxy container running in case you forget. Use my self-destruct CLI extension to have it automatically clean itself up after N hours!

proxy.sh