修改tls文件存放位置
This commit is contained in:
+4
-3
@@ -4,13 +4,13 @@
|
||||
gen_self_tls() {
|
||||
local domain="${1:-bing.com}"
|
||||
local script_dir="$(dirname "$(realpath "$0")")"
|
||||
local key_dir="$script_dir/../key"
|
||||
local config_file="$script_dir/../config/config.json"
|
||||
local key_dir="$script_dir/../tls/self-tls"
|
||||
|
||||
# 导入utils文件夹中的jq_util.sh脚本
|
||||
source "$script_dir/utils/jq_util.sh"
|
||||
|
||||
|
||||
# 生成自签名证书
|
||||
mkdir -p "$key_dir"
|
||||
openssl req -x509 -nodes -newkey ec:<(openssl ecparam -name prime256v1) \
|
||||
-keyout "$key_dir/server.key" \
|
||||
-out "$key_dir/server.crt" \
|
||||
@@ -18,6 +18,7 @@ gen_self_tls() {
|
||||
-days 36500
|
||||
|
||||
# 更新config.json文件中的域名信息
|
||||
local config_file="$script_dir/../config/config.json"
|
||||
modify_json_file "$config_file" "masquerade.proxy.url" "https://$domain"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user