From 5a6d943dd9ace50ae66d3d3e3e372a3b87a9322a Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Sat, 8 Nov 2025 11:54:48 +0800 Subject: [PATCH] update --- bin/init.sh | 8 +++++++- bin/init_with_tls_cert.sh | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 bin/init_with_tls_cert.sh diff --git a/bin/init.sh b/bin/init.sh index fb425e7..1bca7ba 100644 --- a/bin/init.sh +++ b/bin/init.sh @@ -1,13 +1,19 @@ #!/bin/bash +# 使用自签名证书初始化 init() { local script_dir=$(cd "$(dirname "$0")"; pwd) + cp "$script_dir/../config_template/self_cert_config.json" "$script_dir/../config.json" + # 设置端口 bash "$script_dir/update_port.sh" - # 更新密码 + # 设置密码 bash "$script_dir/update_password.sh" + + # 设置混淆密码 + bash "$script_dir/update_obfs_password.sh" # 生成自签名证书和设置域名 bash "$script_dir/set_domain.sh" "bing.com" diff --git a/bin/init_with_tls_cert.sh b/bin/init_with_tls_cert.sh new file mode 100644 index 0000000..1fbd320 --- /dev/null +++ b/bin/init_with_tls_cert.sh @@ -0,0 +1,23 @@ +#!/bin/bash + + +# 使用域名证书初始化 +init_with_tls_cert() { + local script_dir=$(cd "$(dirname "$0")"; pwd) + + cp "$script_dir/../config_template/tls_cert_config.json" "$script_dir/../config.json" + + # 设置端口 + bash "$script_dir/update_port.sh" + + # 设置密码 + bash "$script_dir/update_password.sh" + + # 设置混淆密码 + bash "$script_dir/update_obfs_password.sh" + + echo "[提示] 请自行设置域名和cloudflare_api_token" + echo "初始化设置完成" +} + +init_with_tls_cert \ No newline at end of file