fix(rathole): enforce server-only mode; expose 2333; update docs

This commit is contained in:
2025-09-12 14:28:32 -05:00
parent e0f0a4ab56
commit 01f6309dec
3 changed files with 5 additions and 9 deletions

View File

@@ -5,7 +5,6 @@ log() { echo "[rathole] $(date -Is) $*"; }
abort() { echo "[rathole] ERROR: $*" >&2; exit 1; }
: "${APP_PORT:=3000}"
: "${RATHOLE_MODE:=server}" # server|client
: "${RATHOLE_CONFIG_PATH:=/app/data/rathole.toml}"
# Ensure data dir exists
@@ -38,6 +37,5 @@ python3 -m http.server "$APP_PORT" --bind 0.0.0.0 >/dev/null 2>&1 &
HEALTH_PID=$!
log "Started health endpoint on :${APP_PORT} (pid ${HEALTH_PID})"
log "Launching rathole in ${RATHOLE_MODE} mode with config ${RATHOLE_CONFIG_PATH}"
exec /app/pkg/rathole "$RATHOLE_MODE" -c "$RATHOLE_CONFIG_PATH"
log "Launching rathole in server mode with config ${RATHOLE_CONFIG_PATH}"
exec /app/pkg/rathole server -c "$RATHOLE_CONFIG_PATH"