Capture Neko/WG/network hubs, Studio viewer charts, physical deploy docs, and one-shot scripts so VPS vs physical can be toggled later without losing WIP. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
787 B
Python
23 lines
787 B
Python
# -*- coding: utf-8 -*-
|
|
"""Check Tencent nginx cache for dy.nomadro.cn."""
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
|
|
import paramiko
|
|
|
|
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("82.157.112.245", 22, "ubuntu", "Xiao4669805", timeout=45, allow_agent=False, look_for_keys=False)
|
|
cmd = r"""
|
|
echo '=== vhost ==='
|
|
sudo cat /www/server/panel/vhost/nginx/dy.nomadro.cn.conf
|
|
echo '=== proxy cache zones ==='
|
|
sudo grep -REn 'proxy_cache|proxy_buffer|expires|_next' /www/server/panel/vhost/nginx/dy.nomadro.cn.conf /www/server/nginx/conf/nginx.conf 2>/dev/null | head -40
|
|
"""
|
|
_, o, e = c.exec_command(cmd, timeout=60)
|
|
print((o.read() + e.read()).decode("utf-8", "replace"))
|
|
c.close()
|