diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-11-01 12:44:20 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-11-01 12:44:20 -0700 |
| commit | 4618980eb59e0f591cf23fd7b33a52cc799fbf03 (patch) | |
| tree | 8f3bc6f1c8bad419dae5ef892a00bee80344c9f9 | |
| parent | 5d4703302167fe2f06c2fcbc2d2a5d1d247c7ca0 (diff) | |
fix 1
| -rw-r--r-- | __pycache__/config.cpython-313.pyc | bin | 6022 -> 6022 bytes | |||
| -rw-r--r-- | cache.json | 2 | ||||
| -rw-r--r-- | docker-compose.yml | 5 | ||||
| -rw-r--r-- | gateway/src/server.js | 8 |
4 files changed, 14 insertions, 1 deletions
diff --git a/__pycache__/config.cpython-313.pyc b/__pycache__/config.cpython-313.pyc Binary files differindex afde1ca..f2e25ec 100644 --- a/__pycache__/config.cpython-313.pyc +++ b/__pycache__/config.cpython-313.pyc @@ -1 +1 @@ -{"channels": [{"channel_name": "[Cspacer]INFORMATION", "channel_needed_subscribe_power": "0", "channel_order": "0", "cid": "13", "pid": "0", "total_clients": "0"}, {"channel_name": "[Cspacer]GAME SERVERS", "channel_needed_subscribe_power": "0", "channel_order": "13", "cid": "17", "pid": "0", "total_clients": "0"}, {"channel_name": "[Cspacer]\ud83d\udd07 AFK NPCs \ud83d\udd07", "channel_needed_subscribe_power": "0", "channel_order": "17", "cid": "4", "pid": "0", "total_clients": "1"}, {"channel_name": "General", "channel_needed_subscribe_power": "0", "channel_order": "4", "cid": "1", "pid": "0", "total_clients": "0"}, {"channel_name": "CRASHING OUT", "channel_needed_subscribe_power": "0", "channel_order": "1", "cid": "9", "pid": "0", "total_clients": "0"}, {"channel_name": "Wonhee HQ", "channel_needed_subscribe_power": "0", "channel_order": "9", "cid": "10", "pid": "0", "total_clients": "1"}], "clients": [{"cid": "4", "clid": "1893", "client_channel_group_id": "8", "client_channel_group_inherited_channel_id": "4", "client_database_id": "1", "client_nickname": "serveradmin", "client_servergroups": "2", "client_type": "1"}, {"cid": "10", "clid": "104", "client_channel_group_id": "5", "client_channel_group_inherited_channel_id": "10", "client_database_id": "29", "client_nickname": "The Real Wonhee", "client_servergroups": "8", "client_type": "0", "afk_text": "", "is_afk": false, "is_streaming": false, "stream_text": ""}]}
\ No newline at end of file +{"channels": [{"channel_name": "[Cspacer]INFORMATION", "channel_needed_subscribe_power": "0", "channel_order": "0", "cid": "13", "pid": "0", "total_clients": "0"}, {"channel_name": "[Cspacer]GAME SERVERS", "channel_needed_subscribe_power": "0", "channel_order": "13", "cid": "17", "pid": "0", "total_clients": "0"}, {"channel_name": "[Cspacer]\ud83d\udd07 AFK NPCs \ud83d\udd07", "channel_needed_subscribe_power": "0", "channel_order": "17", "cid": "4", "pid": "0", "total_clients": "1"}, {"channel_name": "General", "channel_needed_subscribe_power": "0", "channel_order": "4", "cid": "1", "pid": "0", "total_clients": "0"}, {"channel_name": "CRASHING OUT", "channel_needed_subscribe_power": "0", "channel_order": "1", "cid": "9", "pid": "0", "total_clients": "0"}, {"channel_name": "Wonhee HQ", "channel_needed_subscribe_power": "0", "channel_order": "9", "cid": "10", "pid": "0", "total_clients": "1"}], "clients": [{"cid": "4", "clid": "4", "client_channel_group_id": "8", "client_channel_group_inherited_channel_id": "4", "client_database_id": "1", "client_nickname": "serveradmin", "client_servergroups": "2", "client_type": "1"}, {"cid": "10", "clid": "1", "client_channel_group_id": "5", "client_channel_group_inherited_channel_id": "10", "client_database_id": "29", "client_nickname": "The Real Wonhee", "client_servergroups": "8", "client_type": "0", "afk_text": "", "is_afk": false, "is_streaming": false, "stream_text": ""}]}
\ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index bd0e4dc..f8b2f2e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,11 @@ services: # (WebQuery 8443, voice 9987/udp) running on the host. `ports:` is ignored # in host mode, so the app binds directly on the host instead. network_mode: host + # Connect to TeamSpeak by its certificate name (TS_HOST=chat.moekyun.me) but + # resolve it to this machine, so WebQuery TLS verification passes and voice + # UDP stays on loopback instead of hairpinning through the public IP. + extra_hosts: + - "chat.moekyun.me:127.0.0.1" environment: # Listen on loopback only; expose it through Nginx / Caddy on the host. WEB_HOST: "127.0.0.1" diff --git a/gateway/src/server.js b/gateway/src/server.js index b4e716e..eb01c8c 100644 --- a/gateway/src/server.js +++ b/gateway/src/server.js @@ -7,6 +7,7 @@ import { VoiceSession } from "./voice-session.js"; const VOICE_PATH = "/ws/voice"; const STATUS_PATH = "/voice-gateway/status"; +const HEALTH_PATH = "/healthz"; const HEARTBEAT_MS = 30_000; const HOP_BY_HOP = ["connection", "keep-alive", "proxy-connection", "proxy-authenticate", "proxy-authorization", "te", "trailer", "upgrade"]; @@ -61,6 +62,13 @@ export function createGatewayServer(config, log = console) { } const server = http.createServer((req, res) => { + // Docker HEALTHCHECK target: answered by the gateway itself so it does not + // depend on (or 404 from) the Flask dashboard behind it. + if (req.url === HEALTH_PATH) { + res.writeHead(200, { "content-type": "text/plain; charset=utf-8", "cache-control": "no-store" }); + res.end("ok"); + return; + } if (req.url === STATUS_PATH) { res.writeHead(200, { "content-type": "application/json", "cache-control": "no-store" }); res.end(JSON.stringify({ available: voiceAvailable(), sessions: sessions.size, maxSessions: config.voice.maxSessions })); |
