diff --git a/luci-app-mosdns/Makefile b/luci-app-mosdns/Makefile index 13bb628..2761c2e 100644 --- a/luci-app-mosdns/Makefile +++ b/luci-app-mosdns/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-mosdns -PKG_VERSION:=1.5.12 +PKG_VERSION:=1.5.13 PKG_RELEASE:=1 LUCI_TITLE:=LuCI Support for mosdns diff --git a/luci-app-mosdns/root/etc/init.d/mosdns b/luci-app-mosdns/root/etc/init.d/mosdns index 778958f..9449640 100755 --- a/luci-app-mosdns/root/etc/init.d/mosdns +++ b/luci-app-mosdns/root/etc/init.d/mosdns @@ -123,7 +123,11 @@ init_yaml() { sed -i "/ecs_remote/d;" $CONF fi # DNS Leak - [ $dns_leak -eq 1 ] && sed -i "0,/primary: query_is_non_local_ip/s/primary: query_is_non_local_ip/primary: forward_remote_upstream/" $CONF + if [ $dns_leak -eq 1 ]; then + sed -i "s/primary: UNDEFINED/primary: forward_remote_upstream/g" $CONF + else + sed -i "s/primary: UNDEFINED/primary: query_is_non_local_ip/g" $CONF + fi # Cloudflare IP if [ $cloudflare -eq 1 ]; then cloudflare_ip=$(sh $MOSDNS_SCRIPT cloudflare) diff --git a/luci-app-mosdns/root/usr/share/mosdns/default.yaml b/luci-app-mosdns/root/usr/share/mosdns/default.yaml index cd855a3..a684438 100644 --- a/luci-app-mosdns/root/usr/share/mosdns/default.yaml +++ b/luci-app-mosdns/root/usr/share/mosdns/default.yaml @@ -153,7 +153,7 @@ plugins: - tag: fallback type: fallback args: - primary: query_is_non_local_ip + primary: UNDEFINED secondary: forward_remote_upstream threshold: 500 always_standby: true