mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix omr-tracker shadowsocks was alway using first host
This commit is contained in:
parent
a6fb78ada5
commit
e0a6c8f282
1 changed files with 5 additions and 2 deletions
|
@ -19,9 +19,12 @@ nodns=0
|
|||
last=0
|
||||
|
||||
while true; do
|
||||
host=${hosts%% *}
|
||||
host="${hosts%% *}"
|
||||
[ "$host" = "$hosts" ] || {
|
||||
hosts="${hosts#* } $host"
|
||||
}
|
||||
if curl -s --socks5 "${proxy}" --max-time "${timeout}" "$host" &>/dev/null ; then
|
||||
[ "${last}" -gt 0 ] && log "Shadowsocks is up (can contact ${host})"
|
||||
[ "${last}" -gt "${retry}" ] && log "Shadowsocks is up (can contact ${host})"
|
||||
/etc/init.d/shadowsocks-libev rules_up 2> /dev/null
|
||||
last=0
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue