nomadro/apps/admin/deploy/_fix_nginx_ws3.py
Eric 4389ebe6cb Ship WeChat audit release 2026-11-02: realtime config, audit vip-ebook shell, admin ops.
Document test9 tag 2026-11-02 for upload; POST config pull + WS, fixed dark home, no debug bar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-02 16:12:57 +08:00

27 lines
704 B
Python

# -*- coding: utf-8 -*-
from __future__ import annotations
import paramiko
HOST, USER, PASS = "82.157.112.245", "ubuntu", "Xiao4669805"
REMOTE = r"""
CONF=/www/server/panel/vhost/nginx/api.nomadro.cn.conf
sudo sed -n '1,220p' "$CONF"
echo '===== WS LOC ====='
sudo grep -n 'config/ws\|Upgrade\|location ' "$CONF" | head -80
"""
def main() -> None:
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect(HOST, username=USER, password=PASS, timeout=30, allow_agent=False, look_for_keys=False)
_, stdout, _ = c.exec_command(REMOTE, timeout=60)
print(stdout.read().decode("utf-8", "replace"))
c.close()
if __name__ == "__main__":
main()