1 Commits
v1.10 ... v1.11

Author SHA1 Message Date
233boy
a6c37635fe fix ss2022 key err 2025-08-01 22:52:17 +08:00
2 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
args=$@ args=$@
is_sh_ver=v1.10 is_sh_ver=v1.11
. /etc/sing-box/sh/src/init.sh . /etc/sing-box/sh/src/init.sh

View File

@@ -467,7 +467,7 @@ change() {
1) 1)
# new port # new port
is_new_port=$3 is_new_port=$3
[[ $host && ! $is_caddy || $is_no_auto_tls ]] && err "($is_config_file) 不支持更改端口, 因为没啥意义." [[ $host && ! $is_caddy || $is_no_auto_tls ]] && err "($is_config_file) 不支持更改端口, 因为没啥意义."
if [[ $is_new_port && ! $is_auto ]]; then if [[ $is_new_port && ! $is_auto ]]; then
[[ ! $(is_test port $is_new_port) ]] && err "请输入正确的端口, 可选(1-65535)" [[ ! $(is_test port $is_new_port) ]] && err "请输入正确的端口, 可选(1-65535)"
[[ $is_new_port != 443 && $(is_test port_used $is_new_port) ]] && err "无法使用 ($is_new_port) 端口" [[ $is_new_port != 443 && $(is_test port_used $is_new_port) ]] && err "无法使用 ($is_new_port) 端口"
@@ -655,7 +655,7 @@ del() {
[[ ! $old_host ]] && return # no host exist or not set new host; [[ ! $old_host ]] && return # no host exist or not set new host;
is_del_host=$old_host is_del_host=$old_host
} }
[[ $is_del_host && $host != $old_host && ! $is_no_auto_tls ]] && { [[ $is_del_host && $host != $old_host && -f $is_caddy_conf/$is_del_host.conf ]] && {
rm -rf $is_caddy_conf/$is_del_host.conf $is_caddy_conf/$is_del_host.conf.add rm -rf $is_caddy_conf/$is_del_host.conf $is_caddy_conf/$is_del_host.conf.add
[[ ! $is_new_json ]] && manage restart caddy & [[ ! $is_new_json ]] && manage restart caddy &
} }
@@ -1199,7 +1199,11 @@ get() {
fi fi
;; ;;
ssss | ss2022) ssss | ss2022)
$is_core_bin generate rand 32 --base64 if [[ $(grep 128 <<<$ss_method) ]]; then
$is_core_bin generate rand 16 --base64
else
$is_core_bin generate rand 32 --base64
fi
;; ;;
ping) ping)
# is_ip_type="-4" # is_ip_type="-4"