I've developed a Python application which rotates VPN gateways from one or more providers. This will change your outbound IP address, and optionally VPN provider(s), on a random basis within a given time period (eg, every 2-4 hours). This uses Docker, the Gluetun VPN client, virtual machines, and optionally HAProxy, MQTT, InfluxDB and Unbound DNS.
I'd really appreciate feedback from members of this subreddit, whether that's in regards to the general concept, the example architecture I've included in the repo (below), the code itself, or whatever else you might have!
Randomizer supports all providers supported by the Gluetun VPN client including custom providers. The randomizer project has been biased towards Wireguard and Linux, with OpenVPN and other OSes in near-term consideration. It's my intention to keep the project as flexible as possible allowing ease in adopting personal modifications.
https://github.com/ingestbot/randomizer
That's cool AF. Do you have any moments of connectivity in between VPN switches?
A most excellent question and an issue just recently addressed.
Gluetun includes a control server which allows state changes to the VPN connection. Early on I would send a
stopped
and let the healthcheck take care of the recovery. At some point I found that 6 second lapse to cause a bit of trouble so I played with sending astopped
and immediaterunning
. The result is a near instantaneous recovery (and random reallocation) of the tunnel.Here's are a couple of examples:
You've raised a great point here and it's something I may look into further (as in soon). It wouldn't be to difficult to measure the entire sequence in milliseconds and offer that up as a metric.