douyinWEB/scripts/_probe_vps_caddy_dns.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

46 lines
1.5 KiB
Python

# -*- coding: utf-8 -*-
import sys, paramiko
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("107.173.30.245", 22, "root", "Xiao4669805", timeout=30, allow_agent=False, look_for_keys=False)
cmds = r"""
set +e
echo '=== caddy ==='
ls -la /etc/caddy /etc/caddy/sites 2>/dev/null
echo '--- Caddyfile ---'
cat /etc/caddy/Caddyfile 2>/dev/null | head -80
echo '--- dy/dylive ---'
ls /etc/caddy/sites | grep -iE 'dy|dylive|live'
echo '--- dylive bak head ---'
head -40 /etc/caddy/sites/dylive.nomadro.com.caddy.bak_csp_1787296362 2>/dev/null
echo
echo '=== 4015/8014 owners ==='
ps -o pid,cmd -p 2155814,3723426 2>/dev/null
ls /etc/systemd/system | grep -iE 'douyin|ypp|dylive|nomad'
systemctl list-units --type=service --all | grep -iE 'douyin|ypp|dylive' || true
echo
echo '=== dns ==='
dig +short dy.nomadro.com A 2>/dev/null || getent hosts dy.nomadro.com
dig +short nomadro.com NS 2>/dev/null
dig +short nomadro.com A
which cloudflared doctl 2>/dev/null
ls /root/.cloudflare* /root/.secrets 2>/dev/null | head
echo
echo '=== docker wg-easy? ==='
docker ps -a | grep -iE 'wg|wireguard'
ls /opt /root | grep -iE 'wg|wire'
echo
echo '=== firewall udp 51820 ==='
ufw status 2>/dev/null | head -20
iptables -L INPUT -n | head -15
"""
_, o, e = c.exec_command(cmds, timeout=60)
print(o.read().decode("utf-8", "replace"))
err = e.read().decode("utf-8", "replace")
if err.strip():
print("STDERR", err[-1500:])
c.close()