完善: CSRF安全修复 + 后台任务管理 + 压测全模块覆盖 + 文档
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# 公网隧道自动重连脚本
|
||||
# 使用 localhost.run 将本地端口暴露到公网
|
||||
|
||||
LOCAL_PORT=${1:-8080}
|
||||
|
||||
while true; do
|
||||
echo "[$(date '+%H:%M:%S')] 正在连接隧道..."
|
||||
ssh -o StrictHostKeyChecking=no \
|
||||
-o ServerAliveInterval=15 \
|
||||
-o ServerAliveCountMax=3 \
|
||||
-o ExitOnForwardFailure=yes \
|
||||
-R 80:localhost:$LOCAL_PORT \
|
||||
nokey@localhost.run 2>&1 | tee /tmp/tunnel.log
|
||||
|
||||
EXIT_CODE=$?
|
||||
echo "[$(date '+%H:%M:%S')] 隧道断开 (exit=$EXIT_CODE),5秒后重连..."
|
||||
sleep 5
|
||||
done
|
||||
Reference in New Issue
Block a user