Route all traffic through a remote VPN

This is theoretically doable but is gonna take some work! I probably would not try OpenVPN, though, since it will be extra tricky to get going.

The simplest option might be to create a Wireguard peer for the service you need to connect to. When you set those up, each one will get a private IPv6 address that’s accessible from your app. You can run these on the same host you’re using for OpenVPN.

The trick is getting those IPs to forward to the right place. It doesn’t look like Projector supports a SOCKS proxy yet, which would be simplest, so you’ll need to run something on your server to proxy connections to the right place. I think this is doable with HAProxy, but you might need different ports per development service.

Assuming you get that going, you should be able to connect to <peer-private-ip> from Projector in your app.

Another option is to do your own wireguard. You can create a wireguard config on your server and then configure your Fly VMs to connect to it and forward all traffic. This is easier than an OpenVPN client because the kernels we use have wireguard support baked in, but it also requires more Docker shenanigans to get connected.

1 Like