1
0
Fork 0
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:
Ycarus 2018-06-11 10:47:51 +02:00
parent a6fb78ada5
commit e0a6c8f282

View file

@ -19,9 +19,12 @@ nodns=0
last=0 last=0
while true; do while true; do
host=${hosts%% *} host="${hosts%% *}"
[ "$host" = "$hosts" ] || {
hosts="${hosts#* } $host"
}
if curl -s --socks5 "${proxy}" --max-time "${timeout}" "$host" &>/dev/null ; then 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 /etc/init.d/shadowsocks-libev rules_up 2> /dev/null
last=0 last=0
else else