#!/bin/bash
export LC_ALL=C
s(){ echo; echo "===== $1 ====="; }
s "XRAY /etc/xray/config.json"
cat /etc/xray/config.json 2>&1 | head -200
s "XRAY /usr/local/etc/xray/config.json"
cat /usr/local/etc/xray/config.json 2>&1 | head -120
s "PID 1399426"
ps -o pid,user,args -p 1399426
s "DOCKER CONTAINERS"
docker ps -a --format '{{.Names}} | {{.Status}} | {{.Ports}}'
s "XRAY-CF INSPECT"
docker inspect xray-cf --format 'net={{.HostConfig.NetworkMode}} state={{.State.Status}} cmd={{.Config.Cmd}} binds={{.HostConfig.Binds}}' 2>&1
docker logs --tail 5 xray-cf 2>&1
s "DOMAIN"
getent hosts mainnet.assaxaq.online
curl -sI -m8 https://mainnet.assaxaq.online -o /dev/null -w "https %{http_code} ip=%{remote_ip}\n" 2>&1
s "PORTS 80 8443 2083 2087 2096"
ss -tlnp | grep -E ':(80|8443|2083|2087|2096) ' || echo "free"
s "SYSTEMD UNITS"
systemctl cat xray.service 2>/dev/null | grep -E 'ExecStart|^User'
systemctl cat vpn-sub.service 2>/dev/null | grep -E 'ExecStart|WorkingDirectory'
which certbot xray 2>&1