From 469dcc3641858182f125be0753b6fca3f6b7bd2c Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 19 Jul 2026 08:41:19 -0700 Subject: [PATCH] feat: parameterize US port and bound sing-box logs --- servers/bwh-hk-dc3/sing-box/compose.yaml | 1 + servers/bwh-us-dc9/sing-box/.env.example | 2 +- servers/bwh-us-dc9/sing-box/compose.yaml | 3 ++- servers/bwh-us-dc9/sing-box/etc/sing-box/config.json.template | 3 +-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/servers/bwh-hk-dc3/sing-box/compose.yaml b/servers/bwh-hk-dc3/sing-box/compose.yaml index 28d8d96..a24822f 100644 --- a/servers/bwh-hk-dc3/sing-box/compose.yaml +++ b/servers/bwh-hk-dc3/sing-box/compose.yaml @@ -34,6 +34,7 @@ services: driver: json-file options: max-size: 200k + max-file: "2" volumes: sing-box-config: diff --git a/servers/bwh-us-dc9/sing-box/.env.example b/servers/bwh-us-dc9/sing-box/.env.example index 9077497..479b3fe 100644 --- a/servers/bwh-us-dc9/sing-box/.env.example +++ b/servers/bwh-us-dc9/sing-box/.env.example @@ -1,5 +1,5 @@ DOMAIN=dc9.example.com ACME_EMAIL=admin@example.com +LISTEN_PORT=7364 USER1_PASSWORD=change-me CLOUDFLARE_API_TOKEN=change-me - diff --git a/servers/bwh-us-dc9/sing-box/compose.yaml b/servers/bwh-us-dc9/sing-box/compose.yaml index b3e7940..a24822f 100644 --- a/servers/bwh-us-dc9/sing-box/compose.yaml +++ b/servers/bwh-us-dc9/sing-box/compose.yaml @@ -4,6 +4,7 @@ services: environment: DOMAIN: ${DOMAIN} ACME_EMAIL: ${ACME_EMAIL} + LISTEN_PORT: ${LISTEN_PORT} USER1_PASSWORD: ${USER1_PASSWORD} CLOUDFLARE_API_TOKEN: ${CLOUDFLARE_API_TOKEN} volumes: @@ -33,8 +34,8 @@ services: driver: json-file options: max-size: 200k + max-file: "2" volumes: sing-box-config: sing-box-data: - diff --git a/servers/bwh-us-dc9/sing-box/etc/sing-box/config.json.template b/servers/bwh-us-dc9/sing-box/etc/sing-box/config.json.template index bf3fa0c..547b2b8 100644 --- a/servers/bwh-us-dc9/sing-box/etc/sing-box/config.json.template +++ b/servers/bwh-us-dc9/sing-box/etc/sing-box/config.json.template @@ -4,7 +4,7 @@ "type": "trojan", "tag": "trojan-in", "listen": "::", - "listen_port": 7364, + "listen_port": ${LISTEN_PORT}, "sniff": true, "sniff_override_destination": true, "users": [ @@ -41,4 +41,3 @@ "timestamp": true } } -