From ea58e5de38bf2556444931fc5a906f94f0ef5be3 Mon Sep 17 00:00:00 2001 From: Kiolow Date: Sat, 26 Oct 2024 09:55:56 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=E6=B7=B7=E6=B7=86?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/print_share_link.sh | 6 ++++-- config.json | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/print_share_link.sh b/bin/print_share_link.sh index 3d7c4dd..9aa63b6 100644 --- a/bin/print_share_link.sh +++ b/bin/print_share_link.sh @@ -18,9 +18,10 @@ password=$(echo "$config" | jq -r '.auth.password') 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地址 port=$(echo "$config" | jq -r '.listen' | cut -d':' -f2) # 端口号 +obfs_password=$(echo "$config" | jq -r '.obfs.salamander.password') # 混淆密码 # 构建分享链接 -share_link="hysteria2://${password}@${ipv4}:${port}/?sni=${sni}&insecure=1#${ipv4}" +share_link="hysteria2://${password}@${ipv4}:${port}/?sni=${sni}&insecure=1#${ipv4}&obfs-password=${obfs_password}" # 输出分享链接 echo -e "\033[32m" @@ -29,4 +30,5 @@ echo "port: $port" echo "password: $password" echo "sni: $sni" echo "分享链接: $share_link" -echo -e "\033[0m" \ No newline at end of file +echo "混淆密码: $obfs_password" +echo -e "\033[0m" diff --git a/config.json b/config.json index 0f80626..f78cf5b 100644 --- a/config.json +++ b/config.json @@ -14,5 +14,11 @@ "url": "https://bing.com", "rewriteHost": true } + }, + "obfs": { + "type": "salamander", + "salamander": { + "password": "bLa4AdWOoE57OdtwYa" + } } }