Commit Graph

3 Commits

Author SHA1 Message Date
Leopere 64347ce8a5
Switch from Swarm labels to Traefik file provider for routing
ci/woodpecker/push/woodpecker Pipeline was successful Details
docker service update --label-add was restarting the tunnel-server
container on every label change, breaking all active SSH tunnels.

Now the server writes YAML config files to /root/traefik/dynamic/ on
the Traefik host via SSH. Traefik's file provider watches the directory
and picks up changes without any container restarts. Clients can
reconnect reliably after server restarts with no restart loops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 15:06:21 -05:00
Leopere b2820ed47f
Rework for Swarm deploy on ingress.nixc.us
- labels.go: use `docker service update --label-add/rm` via SSH to
  dynamically manage Traefik labels on the Swarm service itself,
  matching how traefik-http discovers routes from Docker swarm labels
- stack.production.yml: constrain to ingress.nixc.us, host-mode port
  2222, base traefik.enable labels, SWARM_SERVICE_NAME env
- cmd/server/main.go: SWARM_SERVICE_NAME replaces TRAEFIK_CONFIG_DIR
- .woodpecker.yml: hardcode stack name better-argo-tunnels, update
  smoke test env vars

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 18:24:13 -05:00
Leopere d5a805853a
Initial commit: reverse SSH tunnel server for Traefik
Go binary pair (server + client) that establishes reverse SSH tunnels
and dynamically registers Traefik routes by SSHing into the ingress
host to write file-provider config. Clients need only a private key,
server address, domain, and local port as envvars.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 18:16:41 -05:00