390e10b06db697b8fcdb7158e885de21a66eb784
wirecon
WireGuard tunnel between a rootless-Docker internet host and an unprivileged LXC on Proxmox, with Caddy reverse-proxying inbound traffic into the LXC's LAN. Tuned for flaky uplinks (Telekom DSL/LTE Hybrid) with a fast-reconnect watchdog and structured journald logging.
internet Telekom Hybrid (DSL+LTE)
clients ──► Docker host ══════ wg0 (UDP 51820) ══════ LXC ──► 192.168.1.0/24
(Caddy + (kernel WG +
wireguard-go, watchdog +
rootless) monitor)
Install
LXC side — one-liner
On a fresh unprivileged LXC (after you've added the tun passthrough from proxmox/lxc.conf.snippet and restarted the container):
curl -fsSL https://git.d4nn13.de/d4nn13/wirecon/raw/branch/main/lxc/bootstrap.sh | sudo bash
Then edit /etc/wireguard/wg0.conf (keys, endpoint, LAN iface in the PostUp rules), optionally tune /etc/wirecon/wirecon.conf, and:
systemctl enable --now wg-quick@wg0 wirecon-watchdog.timer wirecon-monitor.service
journalctl -f -t wirecon-watchdog -t wirecon-monitor
Docker side
On the internet host (rootless Docker daemon already running):
git clone https://git.d4nn13.de/d4nn13/wirecon.git
cd wirecon/docker
cp wg/config/wg0.conf.example wg/config/wg0.conf # fill in keys
# edit proxy/Caddyfile for your sites
docker compose up -d --build
Host prereqs:
/dev/net/tunreadable by the rootless usersysctl net.ipv4.ip_unprivileged_port_start=80if you want 80/443 bound directly
Proxmox
Append proxmox/lxc.conf.snippet to /etc/pve/lxc/<VMID>.conf, then pct stop/start <VMID>.
Layout
docker/ rootless-Docker stack: wg (wireguard-go) + Caddy sharing netns
lxc/ installer, systemd units, watchdog/monitor/MTU-probe scripts
proxmox/ tun passthrough snippet for unprivileged LXC
Tuning
- MTU — default
1280. Runwirecon-mtu-probe.shon the LXC to find the real path MTU and updateMTU =on both peers. - Watchdog thresholds (
/etc/wirecon/wirecon.conf): handshake-age, ping loss, and consecutive-failure streak before a forcedwg-quick down/up. - Logs — everything is structured
key=valueon journald:journalctl -u wirecon-watchdog.service -u wirecon-monitor.service --since "1 hour ago"
Languages
Shell
72.2%
JavaScript
11.2%
CSS
9.9%
HTML
5.7%
Vim Snippet
1%