Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
904 B
Python
24 lines
904 B
Python
#!/usr/bin/env python3
|
|
import paramiko, sys
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect("107.173.30.245", username="root", password="Xiao4669805", timeout=20)
|
|
cmds = [
|
|
"dig +short book.nomadro.com A",
|
|
"dig +short book.noamdro.com A",
|
|
"ls -la /etc/caddy/sites/",
|
|
"grep -r book /etc/caddy/ 2>/dev/null",
|
|
"curl -sk -o /dev/null -w 'book.nomadro.com:%{http_code}\n' https://book.nomadro.com/",
|
|
"curl -sI -H 'Host: book.nomadro.com' http://127.0.0.1/ | head -8",
|
|
"ss -tlnp | grep -E ':3000|:4003|:4403'",
|
|
"pm2 status",
|
|
]
|
|
for c in cmds:
|
|
print("===", c)
|
|
_, stdout, stderr = client.exec_command(c)
|
|
out = stdout.read().decode("utf-8", errors="replace")
|
|
err = stderr.read().decode("utf-8", errors="replace")
|
|
print(out or err)
|
|
client.close()
|