update 2026-10-27 11:22:48

This commit is contained in:
action committed 2026-10-27 11:22:48 +08:00
1 parent a4d6470641
commit 63a5dffe55
4907 files changed
+2036791

No files matched your search

@@ -0,0 +1,34 @@
#!/bin/sh
export PATH=/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
. /usr/share/passwall2/utils.sh
listen_address=$1
listen_port=$2
server_address=$3
server_port=$4
busybox pgrep -af "${CONFIG}/" | grep -E 'app\.sh.*(start|stop)|nftables\.sh|iptables\.sh|subscribe\.lua' >/dev/null && {
# No detection during specific task execution
exit 0
}
probeUrl=$(get_cache_var "HAPROXY_PROBE_URL")
probeUrl="${probeUrl:-https://www.google.com/generate_204}"
case "$server_address" in
\[*\]) ;;
*:*) server_address="[$server_address]" ;;
esac
# Probe once per round; HAProxy rise/fall handles consecutive successes and failures.
status=$(/usr/bin/curl -q -I -o /dev/null -sk --noproxy "" -x "socks5h://${server_address}:${server_port}" --connect-timeout 3 --max-time 6 -w "%{http_code}" "$probeUrl") || exit 1
case "$status" in
200|204)
exit 0
;;
*)
exit 1
;;
esac