From eb36486503cf46b23fef656374f75d81ee7c127e Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Wed, 31 Dec 2025 09:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E8=87=AA=E7=AD=BE=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E5=92=8Cacme=E8=AF=81=E4=B9=A6=E7=BB=9F=E4=B8=80=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E5=88=B0tls=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/gen_self_tls.sh | 2 +- config/template/self_cert_config.json | 4 ++-- config/template/tls_cert_config.json | 2 +- docker-compose.yml | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/gen_self_tls.sh b/bin/gen_self_tls.sh index 737b1e4..ae9feb5 100644 --- a/bin/gen_self_tls.sh +++ b/bin/gen_self_tls.sh @@ -4,7 +4,7 @@ gen_self_tls() { local domain="${1:-bing.com}" local script_dir="$(dirname "$(realpath "$0")")" - local key_dir="$script_dir/../tls" + local key_dir="$script_dir/../tls/self-tls" local config_file="$script_dir/../config/config.json" # 导入utils文件夹中的jq_util.sh脚本 diff --git a/config/template/self_cert_config.json b/config/template/self_cert_config.json index b8399e9..d018525 100644 --- a/config/template/self_cert_config.json +++ b/config/template/self_cert_config.json @@ -24,8 +24,8 @@ "enabled": true, "server_name": "你的域名", "alpn": ["h3"], - "key_path": "/etc/sing-box/tls/server.key", - "certificate_path": "/etc/sing-box/tls/server.crt" + "key_path": "/etc/sing-box/tls/self-tls/server.key", + "certificate_path": "/etc/sing-box/tls/self-tls/server.crt" } } ], diff --git a/config/template/tls_cert_config.json b/config/template/tls_cert_config.json index bfa6954..8fffec8 100644 --- a/config/template/tls_cert_config.json +++ b/config/template/tls_cert_config.json @@ -27,7 +27,7 @@ "acme": { "domain": ["你的域名"], "email": "你的邮箱", - "data_directory": "/etc/sing-box/acme", + "data_directory": "/etc/sing-box/tls/acme", "dns01_challenge": { "provider": "cloudflare", "api_token": "你的Cloudflare_API_Token" diff --git a/docker-compose.yml b/docker-compose.yml index 000ea04..e3a5882 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,5 +7,4 @@ services: volumes: - ./config/config.json:/etc/sing-box/config.json - ./tls:/etc/sing-box/tls - - ./acme:/etc/sing-box/acme command: -C /etc/sing-box run \ No newline at end of file