feat: add compatible Trojan manager image

This commit is contained in:
chermack
2026-07-26 05:01:15 +08:00
parent 059be96536
commit cb17d56cae
26 changed files with 320 additions and 41 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
: "${PUBLIC_DOMAIN:?PUBLIC_DOMAIN is required}"
for port in "${TROJAN_LISTEN_PORT:-8443}" "${WEB_PORT:-8081}" "${ACME_HTTP_PORT:-8082}"; do
ss -ltn "sport = :${port}" | grep -q LISTEN || { echo "port ${port} is not listening" >&2; exit 1; }
done
curl --fail --silent --show-error "http://${WEB_HOST:-127.0.0.1}:${WEB_PORT:-8081}/healthz" >/dev/null
openssl x509 -in /opt/trojan/certs/fullchain.pem -noout -checkend 0
openssl x509 -in /opt/trojan/certs/fullchain.pem -noout -text | grep -F "${PUBLIC_DOMAIN}" >/dev/null
echo "verification passed"