update
This commit is contained in:
parent
eb5b38b465
commit
cfaf703094
@ -16,11 +16,12 @@ config=$(cat "$parent_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}')
|
||||||
IPV4=$(curl -4 -sSL --connect-timeout 3 --retry 2 ip.sb || echo "null") # 本机IPV4地址
|
IPV4=$(curl -4 -sSL --connect-timeout 3 --retry 2 ip.sb || echo "null") # 本机IPV4地址
|
||||||
|
PORT=$(echo "$config" | jq -r '.listen' | cut -d':' -f2)
|
||||||
|
|
||||||
# 构建分享链接
|
# 构建分享链接
|
||||||
share_link="hysteria2://${password}@${IPV4}/?sni=${sni}&insecure=1#${IPV4}"
|
share_link="hysteria2://${password}@${IPV4}:${PORT}/?sni=${SNI}&insecure=1#${IPV4}"
|
||||||
|
|
||||||
# 输出分享链接
|
# 输出分享链接
|
||||||
echo "分享链接: "
|
echo "分享链接: "
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user