update
This commit is contained in:
parent
ee43bce84c
commit
88e8c79761
@ -12,18 +12,18 @@ if ! command -v qrencode &> /dev/null; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
script_dir=$(cd "$(dirname "$0")"; pwd) # 脚本文件绝对路径
|
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd) # 脚本文件绝对路径
|
||||||
config_dir=$(readlink -f "$script_dir/../conf") # 配置文件绝对路径
|
CONFIG_DIR=$(readlink -f "$SCRIPT_DIR/../conf") # 配置文件绝对路径
|
||||||
|
|
||||||
# 获取本机IP
|
# 获取本机IP
|
||||||
IPV4=$(curl -4 -sSL --connect-timeout 3 --retry 2 ip.sb || echo "null")
|
IPV4=$(curl -4 -sSL --connect-timeout 3 --retry 2 ip.sb || echo "null")
|
||||||
|
|
||||||
UUID=$(jq -r '.inbounds[0].settings.clients[0].id' $config_dir/config.json)
|
UUID=$(jq -r '.inbounds[0].settings.clients[0].id' $CONFIG_DIR/config.json)
|
||||||
PORT=$(jq -r '.inbounds[0].port' $config_dir/config.json)
|
PORT=$(jq -r '.inbounds[0].port' $CONFIG_DIR/config.json)
|
||||||
DEST=$(jq -r '.inbounds[0].streamSettings.realitySettings.dest' $config_dir/config.json)
|
DEST=$(jq -r '.inbounds[0].streamSettings.realitySettings.dest' $CONFIG_DIR/config.json)
|
||||||
SNI=$(echo $DEST | awk -F ':' '{print $1}')
|
SNI=$(echo $DEST | awk -F ':' '{print $1}')
|
||||||
NETWORK="tcp"
|
NETWORK="tcp"
|
||||||
PUBLIC_KEY=$(cat $config_dir/key.txt | grep "Public" | awk -F ': ' '{print $2}')
|
PUBLIC_KEY=$(cat $CONFIG_DIR/key.txt | grep "Public" | awk -F ': ' '{print $2}')
|
||||||
|
|
||||||
# 打印配置信息
|
# 打印配置信息
|
||||||
echo -e "\033[32m" # config info with green color
|
echo -e "\033[32m" # config info with green color
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user