Images for linux/amd64 and linux/arm64:
docker pull markusmcnugen/qbittorrentvpn:v2.1.2
docker pull ghcr.io/markusmcnugen/qbittorrentvpn:v2.1.2
VPN
- The container starts under rootless Docker, rootless Podman and a daemon with
userns-remap. There/dev/net/tunbelongs to a host user the container does not map, and start-up stopped when it could not give the device to the vpn group; the device is now used as it is when the vpn user can open it, and start-up stops with the host command that fixes it when it cannot. Checked with OpenVPN, WireGuard in the kernel andwireguard-gounder rootless Podman. - WireGuard through
wireguard-gorecovers whenwireguard-gois killed. The killed process left its control socket behind, so its replacement was configured through the kernel, which refuses a userspace interface, andwg0stayed up with no peer untilVPN_RECOVERY_TIMEOUTstopped the container, or for good withVPN_RECOVERY_TIMEOUT=0. The old socket is removed first, and an interface left without its peer is created again at the next check.
Logs
- A start-up failure is logged once. The exit handler logged the command that ended start-up a second time, as
command failed with status 1 at line 1. wireguard-gono longer prints its boxed banner about the kernel module at every start, which said the kernel had WireGuard even on hosts without it.- A killed OpenVPN or
wireguard-gono longer adds a shell job notice, such asline 14: 256 Killed env -i ..., to the log; the supervisor's own line reports the exit.
Documentation
- Rootless Docker and Podman: what differs there, and why
PUID=0andPGID=0are your own user.
Tests
- The end-to-end tests fail on any line bash itself writes to the container's log, after OpenVPN is killed and after each stop, and a new
start_failurescenario checks that a start-up failure is logged once with exit status 1. - A new
wireguard_userspacescenario runs WireGuard throughwireguard-go, kills it, and checks that traffic flows again through its replacement and that the container then stops cleanly. - The kill switch check that deletes
wg0pauses the supervisor while it probes. The supervisor recreateswg0within milliseconds of its next check, so a probe that started just after one occasionally reached the target through the new tunnel and failed the check; the packet capture showed nothing left outside the tunnel. A control shows the paused probe reaches the target whilewg0exists.