重构代码, 抽取变量
This commit is contained in:
parent
75e1560a30
commit
37353ee6dd
@ -26,7 +26,7 @@ print_share_link() {
|
||||
local port=$(echo "$config" | jq -r '.inbounds[0].listen_port')
|
||||
local password=$(echo "$config" | jq -r '.inbounds[0].users[0].password')
|
||||
local congestion_control=$(echo "$config" | jq -r '.inbounds[0].congestion_control')
|
||||
|
||||
local allowInsecure=1
|
||||
|
||||
# 检查sni
|
||||
if [ "$sni" = "你的域名或伪装域名" ] || [ -z "$sni" ] || [[ "$sni" == null ]]; then
|
||||
@ -34,7 +34,7 @@ print_share_link() {
|
||||
fi
|
||||
|
||||
# 构建分享链接
|
||||
local share_link="tuic://$uuid:$password@$ipv4:$port?sni=$sni&alpn=h3&insecure=1&allowInsecure=1&congestion_control=bbr#Tuic节点"
|
||||
local share_link="tuic://$uuid:$password@$ipv4:$port?sni=$sni&alpn=h3&insecure=1&allowInsecure=$allowInsecure&congestion_control=bbr#Tuic节点"
|
||||
|
||||
# 输出分享链接
|
||||
echo -e "\033[32m"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user