From 3909d2edaf4b2ef4dfb69b4fee9474c36948dbb8 Mon Sep 17 00:00:00 2001 From: 233boy <31657650+233boy@users.noreply.github.com> Date: Wed, 16 Apr 2025 11:21:19 +0800 Subject: [PATCH] tuic add password args --- sing-box.sh | 2 +- src/core.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sing-box.sh b/sing-box.sh index 0f04d16..b3ce41b 100644 --- a/sing-box.sh +++ b/sing-box.sh @@ -1,6 +1,6 @@ #!/bin/bash args=$@ -is_sh_ver=v1.05 +is_sh_ver=v1.06 . /etc/sing-box/sh/src/init.sh \ No newline at end of file diff --git a/src/core.sh b/src/core.sh index 515bd3e..d060b57 100644 --- a/src/core.sh +++ b/src/core.sh @@ -1094,6 +1094,8 @@ get() { tuic*) net=tuic is_protocol=$net + [[ ! $password ]] && password=$uuid + is_users="users:[{uuid:\"$uuid\",password:\"$password\"}]" json_str="$is_users,congestion_control:\"bbr\",$is_tls_json" ;; trojan*) @@ -1329,10 +1331,10 @@ info() { ;; tuic) is_insecure=1 - is_can_change=(0 1 5) - is_info_show=(0 1 2 3 8 9 20 21) - is_url="$is_protocol://$uuid:@$is_addr:$port?alpn=h3&allow_insecure=1&congestion_control=bbr#233boy-$net-$is_addr" - is_info_str=($is_protocol $is_addr $port $uuid tls h3 true bbr) + is_can_change=(0 1 4 5) + is_info_show=(0 1 2 3 10 8 9 20 21) + is_url="$is_protocol://$uuid:$password@$is_addr:$port?alpn=h3&allow_insecure=1&congestion_control=bbr#233boy-$net-$is_addr" + is_info_str=($is_protocol $is_addr $port $uuid $password tls h3 true bbr) ;; reality) is_color=41