You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-72Lines changed: 54 additions & 72 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,17 +47,11 @@
47
47
- Supports running as systemd unit (natively and as podman container)
48
48
- Supports roaming clients
49
49
50
-
> **Note**
51
-
>
52
-
> For old OpenVPN based container's documentation,
53
-
> See [here](https://github.com/tprasadtp/protonvpn-docker/tree/release/v5).
54
-
55
50
## Container Images
56
51
57
-
> **Warning**
52
+
> [!WARNING]
58
53
>
59
-
> *[gVisor](https://gvisor.dev) runtime is **NOT** supported!
60
-
> * cgroup v1 API is not supported.
54
+
> [gVisor](https://gvisor.dev) and cgroup v1 runtime is **NOT** supported!
61
55
62
56
Images are published at [ghcr.io/tprasadtp/protonwire][ghcr].
63
57
@@ -66,15 +60,16 @@ Images are published at [ghcr.io/tprasadtp/protonwire][ghcr].
66
60
- If using Debian 11 (Buster) or later, Raspberry Pi OS (Buster) or later, Fedora, ArchLinux, Linux Mint 20.x or later, RHEL 9 or later, Alma Linux 9 or later, CentOS 9 Stream, Ubuntu 20.04 or later have the required kernel module built-in.
67
61
- Kernel versions 5.6 or later.
68
62
- If **NONE** of the above conditions can be satisfied, install WireGuard. Your distribution might already package DKMS module or provide signed kernels with WireGuard built-in. Visit https://www.wireguard.com/install/ for more info.
69
-
> **Note**
70
-
>
71
-
> If running as a container, Wireguard **MUST** be installed on the host, **not** the container.
72
-
73
63
- To check current kernel version run,
74
64
```bash
75
65
uname -r
76
66
```
77
67
68
+
> [!IMPORTANT]
69
+
>
70
+
> If running as a container, Wireguard **MUST** be installed on the host, **not** the container.
71
+
72
+
78
73
## Generating WireGuard Private Key
79
74
80
75
- Log in to ProtonVPN and go to **Downloads** → **WireGuard configuration**.
@@ -136,7 +131,7 @@ Though server name like `NL#1`(or `NL-1`) is supported it is not recommended.
136
131
137
132
## KillSwitch
138
133
139
-
> **Warning**
134
+
> [!WARNING]
140
135
>
141
136
> This feature is experimental and is **NOT** covered by semver compatibility guarantees.
-k, --private-key FILE|KEY Wireguard private key or
@@ -178,7 +173,7 @@ Options:
178
173
--check-interval INT IP check interval in seconds (default 60)
179
174
--check-url URL IP check endpoint URL
180
175
--skip-dns-config Skip configuring DNS.
181
-
(Useful for Kubernetes and Nomad)
176
+
(Useful for Kubernetes and Consul)
182
177
--kill-switch Enable killswitch (Experimental)
183
178
--p2p Verify if specified server supports P2P
184
179
--streaming Verify if specified server supports streaming
@@ -201,7 +196,7 @@ Environment:
201
196
WIREGUARD_PRIVATE_KEY WireGuard private key or file
202
197
PROTONVPN_SERVER ProtonVPN server
203
198
IPCHECK_INTERVAL Custom IP check interval in seconds (default 60)
204
-
IPCHECK_URL IP check endpoint URL (must be secure)
199
+
IPCHECK_URL IP check endpoint URL (must be https://)
205
200
SKIP_DNS_CONFIG Set to '1' to skip configuring DNS
206
201
KILL_SWITCH Set to '1' to enable killswitch (Experimental)
207
202
DEBUG Set to '1' to enable debug logs
@@ -216,12 +211,6 @@ Same can be used as liveness probe and readiness probe for Kubernetes.
216
211
217
212
## Docker Compose
218
213
219
-
> **Note**
220
-
>
221
-
> Because docker does not provide a reliable way to bring up containers in an ordered
222
-
> manner and lacks `sd_notify` support for containers(see bugs like #178),
223
-
> it is recommended to use [podman](#podman) with systemd.
224
-
225
214
If entire stack is in a single compose file, then `network_mode: service:protonwire` on the services which should be routed via VPN. If the VPN stack is **NOT** in same compose file use `network_mode: container:<protonwire-container-name>`. Use [`podman-compose`](https://github.com/containers/podman-compose) for use with podman.
226
215
227
216
As an example, run caddy web-server, proxying https://ip.me, via VPN using the compose config given below. Once the stack is up, visiting the http://localhost:8000, or `curl -s http://localhost:8000` should show VPN's country and IP address.
> - It is **essential** to expose/publish port(s) _on protonwire container_, instead of application container.
284
273
> - **SHOULD NOT** run the container as privileged. Adding capability `CAP_NET_ADMIN`**AND** defined `sysctls` should be sufficient.
@@ -325,18 +314,6 @@ This section covers running containers via podman. But for deployments use [podm
325
314
ghcr.io/tprasadtp/protonwire:7
326
315
```
327
316
328
-
> **Note**
329
-
>
330
-
> * This example publishes container port 8000 to host port 8000.
331
-
> You **MUST** change these to match your application container(s).
332
-
> * To publish additional ports from other containers using this VPN
333
-
> (usually done via argument `--publish <host-port>:<container-port>`),
334
-
> it **MUST** be done on _protonwire_ container.
335
-
> * `--sysctl` flags are important! without these, container cannot
336
-
> create/manage WireGuard interface.
337
-
> * `mode=600` in secret mount is important, as script refuses to use
338
-
> private key with insecure permissions.
339
-
340
317
- Create app(s) sharing network namespace with `protonwire` container. As an example, we are using caddy
341
318
to proxy website which shows IP info. Replace these with your application container(s) like [pyload](https://github.com/pyload/pyload#docker-images), [firefox](https://docs.linuxserver.io/images/docker-firefox) etc.
342
319
@@ -353,6 +330,19 @@ to proxy website which shows IP info. Replace these with your application contai
353
330
354
331
- Verify that application containers are using VPN by visiting http://<hostname or IP>:8000.
355
332
333
+
> [!IMPORTANT]
334
+
>
335
+
> * The above example publishes container port 8000 to host port 8000.
336
+
> You **MUST** change these to match your application container(s).
337
+
> * To publish additional ports from other containers using this VPN
338
+
> (usually done via argument `--publish <host-port>:<container-port>`),
339
+
> it **MUST** be done on _protonwire_ container.
340
+
> * `--sysctl` flags are important! without these, container cannot
341
+
> create/manage WireGuard interface.
342
+
> * `mode=600` in secret mount is important, as script refuses to use
343
+
> private key with insecure permissions.
344
+
345
+
356
346
## Running podman containers with systemd
357
347
358
348
This is a bit more involved than just running a podman/docker run command.
@@ -363,7 +353,7 @@ to start only when protonwire is up **and** healthy.
363
353
- Dependency ordering during upgrades.
364
354
- Use well known systemctl to see status of containers.
365
355
366
-
> **Warning**
356
+
> [!IMPORTANT]
367
357
>
368
358
> - This feature is experimental and is **NOT** covered by semver compatibility guarantees.
369
359
> - Only podman version 4.5 or later is supported due to missing.
> - To publish additional ports from other containers using this VPN, it **MUST** be done
692
-
> on the `protonwire` container!
693
-
> - `--sysctl` and `--cap-add` flags are important! without these, container cannot create
694
-
> or manage WireGuard interfaces or routing.
695
-
> - docker rootless should also work just fine for most users, but is considered experimental.
696
673
674
+
> [!IMPORTANT]
675
+
>
676
+
> - To publish additional ports from other containers using this VPN, it **MUST** be done
677
+
> on the `protonwire` container!
678
+
> - `--sysctl` and `--cap-add` flags are important! without these, container cannot create
679
+
> or manage WireGuard interfaces or routing.
680
+
> - docker rootless should also work just fine for most users, but is considered experimental.
697
681
698
682
- To use VPN in other container(s), use `--net=container:protonwire` flag.
699
683
For example, we can run caddy to proxy `https://ip.me/` via VPN. Visiting http://localhost:8000, or `curl http://localhost:8000` should show VPN's country and IP address.
@@ -711,10 +695,6 @@ For example, we can run caddy to proxy `https://ip.me/` via VPN. Visiting http:/
711
695
--to https://ip.me:443
712
696
```
713
697
714
-
> **Note**
715
-
>
716
-
> There are no port mappings done here! It should be done on the VPN container!
717
-
718
698
## Dependencies
719
699
720
700
Following dependencies are **in addition** to WireGuard support in Kernel.
@@ -786,7 +766,7 @@ if running as systemd unit outside of containers.
786
766
sudo protonwire check
787
767
```
788
768
789
-
> **Note**
769
+
> [!TIP]
790
770
>
791
771
> Add `--debug` flag to see debug logs.
792
772
@@ -795,21 +775,25 @@ if running as systemd unit outside of containers.
795
775
Provides rich systemd integration. Connected server kill-switch state is displayed with
796
776
`systemctl status protonwire`. For running containers as systemd unit see [podman-systemd-integration](#podman-systemd-integration)
797
777
798
-
<pre><font color="#B8BB26"><b>vagrant@debian-minimal</b></font>:<font color="#83A598"><b>~</b></font>$ systemctl status protonwire --no-pager
0 commit comments