fix: 修复错误的config_dir变量
This commit is contained in:
parent
3a22d6f18a
commit
626f561b3f
@ -1,11 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# 获取脚本bin目录路径
|
script_dir=$(cd "$(dirname "$0")"; pwd) # 脚本所在目录
|
||||||
script_dir=$(cd "$(dirname "$0")"; pwd)
|
config_dir=$(readlink -f "$script_dir/../") # 配置文件所在目录
|
||||||
|
|
||||||
# 读取配置文件内容
|
|
||||||
config=$(cat "${script_dir}/../config.json")
|
|
||||||
|
|
||||||
source "${script_dir}/utils/base.sh"
|
source "${script_dir}/utils/base.sh"
|
||||||
|
|
||||||
# 检查jq是否安装
|
# 检查jq是否安装
|
||||||
@ -19,7 +15,8 @@ if [ "$password" = "你的密码" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 读取配置文件内容
|
||||||
|
config=$(cat "${script_dir}/../config.json")
|
||||||
# 提取所需信息
|
# 提取所需信息
|
||||||
password=$(echo "$config" | jq -r '.auth.password')
|
password=$(echo "$config" | jq -r '.auth.password')
|
||||||
sni=$(echo "$config" | jq -r '.masquerade.proxy.url' | awk -F'/' '{print $3}')
|
sni=$(echo "$config" | jq -r '.masquerade.proxy.url' | awk -F'/' '{print $3}')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user