Files
agent0/tunnel-entrypoint.sh
T

15 lines
468 B
Bash
Raw Normal View History

2026-04-11 12:59:02 +02:00
#!/bin/sh
# Establish a persistent SSH reverse tunnel from this machine to the VPS.
# Traffic arriving at VPS:50001 is forwarded to agent0:80 on the Docker network.
set -e
exec autossh -M 0 -N \
-i /run/tunnel/id_ed25519 \
-o "UserKnownHostsFile=/run/tunnel/known_hosts" \
-o "StrictHostKeyChecking=yes" \
-o "ServerAliveInterval=30" \
-o "ServerAliveCountMax=3" \
-o "ExitOnForwardFailure=yes" \
2026-04-11 16:42:44 +02:00
-R 0.0.0.0:50001:agent0:80 \
2026-04-11 12:59:02 +02:00
tunnel@glitch.university