mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Increase default timeout for shadowsocks tracker
This commit is contained in:
parent
aebad586a3
commit
e061504eeb
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ log() {
|
|||
logger -p daemon.info -t "${basename}" "$@"
|
||||
}
|
||||
|
||||
timeout=${OMR_TRACKER_TIMEOUT:-2}
|
||||
timeout=${OMR_TRACKER_TIMEOUT:-5}
|
||||
interval=${OMR_TRACKER_INTERVAL:-10}
|
||||
retry=${OMR_TRACKER_TRIES:-4}
|
||||
proxy=${OMR_TRACKER_PROXY:-127.0.0.1:1111}
|
||||
|
@ -21,11 +21,11 @@ last=0
|
|||
while true; do
|
||||
host=${hosts%% *}
|
||||
if curl -s --socks5 "${proxy}" --max-time "${timeout}" --retry "${retry}" "$host" &>/dev/null ; then
|
||||
[ ${last} = 0 ] && log "Shadowsocks is up"
|
||||
[ ${last} = 0 ] && log "Shadowsocks is up (can contact ${host})"
|
||||
/etc/init.d/shadowsocks-libev rules_up 2> /dev/null
|
||||
last=1
|
||||
else
|
||||
[ ${last} = 1 ] && log "Shadowsocks is down"
|
||||
[ ${last} = 1 ] && log "Shadowsocks is down (can't contact ${host})"
|
||||
/etc/init.d/shadowsocks-libev rules_down 2> /dev/null
|
||||
last=0
|
||||
fi
|
||||
|
|
|
@ -22,6 +22,6 @@ config shadowsocks 'shadowsocks'
|
|||
list hosts '23.96.52.53'
|
||||
list hosts '104.40.211.35'
|
||||
list hosts '80.67.169.12'
|
||||
option timeout '2'
|
||||
option timeout '5'
|
||||
option tries '4'
|
||||
option interval '10'
|
Loading…
Add table
Add a link
Reference in a new issue