This project sets up a HTTP proxy that routes all its traffic through multiple ProtonVPN OpenVPN connection. The choosen tunnel is automatically rotated for each request.
- Docker
- Docker Compose
- A ProtonVPN account (Free or Paid)
-
Clone the Repository (if applicable later):
git clone <repository_url> cd proton-docker
-
OpenVPN Configurations:
- Download your desired ProtonVPN OpenVPN configuration files (UDP recommended) from the ProtonVPN Account Downloads page.
- Place the
.ovpnfiles into theovpn_configs/directory in this project.
-
Create
.envFile:- Copy the example environment file:
cp .env.example .env
- Edit the
.envfile and fill in your ProtonVPN credentials and other settings:PVPN_USERNAME=YOUR_PROTONVPN_OPENVPN_USERNAME PVPN_PASSWORD=YOUR_PROTONVPN_OPENVPN_PASSWORD # Optional: Set the rotation interval in seconds (default is 300 seconds / 5 minutes) ROTATION_INTERVAL=300 # Optional: Override DNS servers used by the container after VPN connection. # Comma-separated. Examples: # DNS_SERVERS_OVERRIDE=1.1.1.1,1.0.0.1 # Cloudflare # DNS_SERVERS_OVERRIDE=8.8.8.8,8.8.4.4 # Google # DNS_SERVERS_OVERRIDE=10.2.0.1 # Example ProtonVPN internal DNS DNS_SERVERS_OVERRIDE=
IMPORTANT: The
PVPN_USERNAMEandPVPN_PASSWORDare your OpenVPN/IKEv2 credentials, not your main Proton account login. You can find these in your ProtonVPN account dashboard under Account -> OpenVPN / IKEv2 username. - Copy the example environment file:
-
Build and Run:
docker-compose build docker-compose up -d
Once the container is running, configure your browser or application to use an HTTP proxy:
- Host/Address:
localhost(if running Docker locally) or the IP address of the machine running Docker. - Port:
8100(or as configured indocker-compose.yml).
For multi-connection mode, pick the port of the container corresponding to the desired tunnel.
Check the logs to see the VPN server rotation:
docker-compose logs -f proton_service