mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-11 23:07:52 +08:00
update 2026-07-15 01:08:36
This commit is contained in:
1 parent
e68452b5dd
commit
c2d17d02c4
1974 files changed
+1523390
-90
No files matched your search
@@ -164,14 +164,15 @@ start() {
|
||||
retry_num=$(config_n_get $id autoswitch_retry_num 1)
|
||||
restore_switch=$(config_n_get $id autoswitch_restore_switch 0)
|
||||
probe_url=$(config_n_get $id autoswitch_probe_url "https://www.google.com/generate_204")
|
||||
backup_node=$(config_n_get $id autoswitch_backup_node)
|
||||
backup_node=$(lua_api "get_socks_backup_nodes(\"${id}\")")
|
||||
if [ -n "$backup_node" ]; then
|
||||
backup_node=$(echo "$backup_node" | tr -s ' ' '\n' | uniq | tr -s '\n' ' ')
|
||||
backup_node_num=$(printf "%s\n" "$backup_node" | wc -w)
|
||||
echolog " - Socks切换检测:端口[${socks_port}] 后备节点数量:${backup_node_num}"
|
||||
if [ "$backup_node_num" -eq 1 ]; then
|
||||
[ "$main_node" = "$backup_node" ] && return
|
||||
fi
|
||||
else
|
||||
echolog " - Socks切换检测:端口[${socks_port}] 后备节点数量:0"
|
||||
return
|
||||
fi
|
||||
while [ -n "$backup_node" ]; do
|
||||
|
||||
Reference in new issue
Block a user