1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Disable iptables DNS not needed lookups

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-12-03 22:52:34 +01:00
parent 0b2c504244
commit 275a0eb2e6
3 changed files with 7 additions and 7 deletions

View file

@ -63,7 +63,7 @@ while true; do
uci -q set openmptcprouter.omr.shadowsocks="up"
uci -q commit openmptcprouter.omr
}
if [ -z "$(iptables -t nat -L | grep ss_rules_forward)" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.disabled)" != "1" ]; then
if [ -z "$(iptables -t nat -L -n | grep ss_rules_forward)" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.disabled)" != "1" ]; then
_log "Reload Shadowsocks rules"
/etc/init.d/shadowsocks-libev rules_up 2> /dev/null
_get_ip
@ -74,7 +74,7 @@ while true; do
last=$((last + 1 ))
[ -z "$nocontact" ] && nocontact="$host" || nocontact="$nocontact, $host"
[ "${last}" -ge "${retry}" ] && {
if [ -n "$(iptables -t nat -L | grep ss_rules_forward)" ]; then
if [ -n "$(iptables -t nat -L -n | grep ss_rules_forward)" ]; then
_log "Shadowsocks is down (can't contact ${nocontact})"
uci -q set openmptcprouter.omr.shadowsocks="down"
uci -q commit openmptcprouter.omr