initial commit: wirecon WireGuard stack

Rootless-Docker server (wireguard-go + Caddy sharing netns) and
unprivileged-LXC client (kernel WG + systemd watchdog/monitor/MTU-probe)
with curl-pipeable bootstrap. Tuned for Telekom DSL/LTE Hybrid uplinks.
This commit is contained in:
d4nn13 committed 2026-04-19 18:20:21 +02:00
commit 49b01dfcd3
19 files changed
+770

No files matched your search

@@ -0,0 +1,14 @@
[Unit]
# Make sure we come up after the LAN is ready.
After=network-online.target
Wants=network-online.target
[Service]
# wg-quick@ is Type=oneshot with RemainAfterExit=yes by default.
# If `wg-quick up` itself fails (e.g. transient DNS blip resolving the
# server endpoint at boot), retry a few times before giving up — the
# watchdog takes over from there.
Restart=on-failure
RestartSec=10s
# oneshot needs this for Restart to apply:
# (systemd accepts Restart on oneshot in practice)
@@ -0,0 +1,17 @@
[Unit]
Description=wirecon tunnel continuous monitor
After=wg-quick@wg0.service network-online.target
Wants=wg-quick@wg0.service
[Service]
Type=simple
EnvironmentFile=-/etc/wirecon/wirecon.conf
ExecStart=/usr/local/bin/wirecon-monitor.sh
Restart=always
RestartSec=5s
SyslogIdentifier=wirecon-monitor
# Low priority; observation only.
Nice=5
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,11 @@
[Unit]
Description=wirecon tunnel watchdog (one tick)
After=wg-quick@wg0.service network-online.target
Wants=wg-quick@wg0.service
[Service]
Type=oneshot
EnvironmentFile=-/etc/wirecon/wirecon.conf
ExecStart=/usr/local/bin/wirecon-watchdog.sh
SyslogIdentifier=wirecon-watchdog
Nice=-5
@@ -0,0 +1,14 @@
[Unit]
Description=wirecon watchdog — run check every 20s
After=wg-quick@wg0.service
[Timer]
# Kick off soon after boot, then every 20s.
OnBootSec=30s
OnUnitActiveSec=20s
AccuracySec=1s
# Prevents timer drift if a check takes a while (e.g. during a reconnect).
Unit=wirecon-watchdog.service
[Install]
WantedBy=timers.target