add README with install one-liner and architecture overview
This commit is contained in:
1 parent
49b01dfcd3
commit
390e10b06d
1 file changed
+65
@@ -0,0 +1,65 @@
|
|||||||
|
# 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/tun` readable by the rootless user
|
||||||
|
- `sysctl net.ipv4.ip_unprivileged_port_start=80` if 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`. Run `wirecon-mtu-probe.sh` on the LXC to find the real path MTU and update `MTU =` on both peers.
|
||||||
|
- **Watchdog** thresholds (`/etc/wirecon/wirecon.conf`): handshake-age, ping loss, and consecutive-failure streak before a forced `wg-quick down/up`.
|
||||||
|
- **Logs** — everything is structured `key=value` on journald:
|
||||||
|
```
|
||||||
|
journalctl -u wirecon-watchdog.service -u wirecon-monitor.service --since "1 hour ago"
|
||||||
|
```
|
||||||
Reference in new issue
Block a user