douyinWEB/scripts/_verify_frp_after_restart.py
eric d409e416da Ship physical dual-edge stack, Studio CDP live metrics, and ops tooling.
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>
2026-09-04 22:42:40 -05:00

31 lines
1.1 KiB
Python

# -*- coding: utf-8 -*-
import sys, paramiko
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
v=paramiko.SSHClient(); v.set_missing_host_key_policy(paramiko.AutoAddPolicy())
v.connect("107.173.30.245",22,"root","Xiao4669805",timeout=30,allow_agent=False,look_for_keys=False)
_,o,_=v.exec_command(r"""
ss -lntp | grep frp-panel
echo '---'
journalctl -u frpp --since '5 min ago' --no-pager | grep -Ei 'login info|new proxy|error' | tail -40
""", timeout=40)
print("=== VPS ===")
print(o.read().decode())
v.close()
m=paramiko.SSHClient(); m.set_missing_host_key_policy(paramiko.AutoAddPolicy())
m.connect("107.172.77.34",22,"root","Xiao4669805",timeout=30,allow_agent=False,look_for_keys=False)
_,o,_=m.exec_command(r"""
python3 <<'PY'
import sqlite3
c=sqlite3.connect('/opt/frp-panel/data.db')
print('clients:')
for r in c.execute("SELECT client_id, server_id, last_seen_at FROM clients WHERE deleted_at IS NULL AND client_id LIKE '%pve%' ORDER BY client_id"):
print(' ', r)
PY
curl -sS -o /dev/null -w 'master9000:%{http_code}\n' http://127.0.0.1:9000/login
""", timeout=40)
print("=== MASTER ===")
print(o.read().decode())
m.close()