luci-app-mosdns: fix DNS leak option does not work
* busybox sed does not support regular expression.
This commit is contained in:
parent
d708a3edad
commit
95a3ebae6d
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user