feat: add compatible Trojan manager image
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user