mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51:50 +00:00
Add Shadowsocks rust or libev info in omr-tracker shadowsocks proxy
This commit is contained in:
parent
55430ee3ae
commit
1d2a10b0ba
1 changed files with 3 additions and 2 deletions
|
@ -79,6 +79,7 @@ interval=${OMR_TRACKER_INTERVAL:-10}
|
|||
retry=${OMR_TRACKER_TRIES:-4}
|
||||
proxy=${OMR_TRACKER_PROXY:-127.0.0.1:1111}
|
||||
hosts=${OMR_TRACKER_HOSTS:-1.1.1.1 1.0.0.1}
|
||||
hosts6=${OMR_TRACKER_HOSTS6}
|
||||
wait_test=${OMR_TRACKER_WAIT_TEST:-0}
|
||||
server=${OMR_TRACKER_SERVER:-sss0}
|
||||
type=${OMR_TRACKER_SS_TYPE:-libev}
|
||||
|
@ -101,7 +102,7 @@ while true; do
|
|||
nocontact=""
|
||||
[ "${last}" -ge "${retry}" ] || [ "$(uci -q get openmptcprouter.omr.ss_${server})" = "" ] && {
|
||||
_log "Shadowsocks ${server} is up (can contact via http ${host})"
|
||||
OMR_TRACKER_STATUS_MSG="Shadowsocks ${server} is up (can contact via http ${host})"
|
||||
OMR_TRACKER_STATUS_MSG="Shadowsocks $type ${server} is up (can contact via http ${host})"
|
||||
uci -q set openmptcprouter.omr.ss_${server}="up"
|
||||
uci -q commit openmptcprouter.omr
|
||||
mail_alert="$(uci -q get omr-tracker.proxy.mail_alert)"
|
||||
|
@ -141,7 +142,7 @@ while true; do
|
|||
[ "${last}" -ge "${retry}" ] && {
|
||||
if [ "$OMR_TRACKER_PREV_STATUS" != "ERROR" ] && [ -n "$($IPTABLES -w -t nat -L -n 2>/dev/null | grep ssr)" ] || [ -n "$(nft list ruleset 2>/dev/null | grep ss_r)" ] || [ -n "$(nft list ruleset 2>/dev/null | grep ssr_r)" ]; then
|
||||
_log "Shadowsocks ${server} is down (can't contact via http ${nocontact})"
|
||||
OMR_TRACKER_STATUS_MSG="Shadowsocks ${server} is down (can't contact via http ${nocontact})"
|
||||
OMR_TRACKER_STATUS_MSG="Shadowsocks $type ${server} is down (can't contact via http ${nocontact})"
|
||||
uci -q set openmptcprouter.omr.ss_${server}="down"
|
||||
uci -q commit openmptcprouter.omr
|
||||
if [ "$(uci show openmptcprouter.omr | grep ss_ | grep up)" = "" ]; then
|
||||
|
|
Loading…
Reference in a new issue