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