mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-18 17:33:31 +00:00
luci-app-mwan3helper: enable ipsets at startup
This commit is contained in:
parent
81251aef39
commit
811894e17f
@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for MWAN3 Helper
|
||||
LUCI_DEPENDS:=+luci-app-mwan3 +pdnsd-alt +dnsmasq-full +ipset
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -10,8 +10,9 @@ s = m:section(TypedSection, "mwan3helper")
|
||||
s.addremove = false
|
||||
s.anonymous = true
|
||||
|
||||
o = s:option(Flag, "enabled", translate("Enable"))
|
||||
o = s:option(Flag, "enabled", translate("Enable GFW IPSet"))
|
||||
o.rmempty = false
|
||||
o.description = translate("启用 DNS 防污染并打开GFW IPSet(与SSR的GFW列表模式不能同时开启)")
|
||||
|
||||
o = s:option(ListValue, "dns", translate("Anti-pollution DNS Server"))
|
||||
o:value("208.67.222.222:443", translate("OpenDNS (208.67.222.222)"))
|
||||
|
@ -1,3 +1,13 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
msgid "MWAN3 Helper"
|
||||
msgstr "MWAN3 分流助手"
|
||||
|
||||
@ -10,3 +20,5 @@ msgstr "IPSet列表"
|
||||
msgid "MWAN3 Helper generate IPSets"
|
||||
msgstr "自动生成中国地址段和各大ISP运营商的 IPSet 地址段,并解决国外域名的污染问题,帮助MWAN3分流 ISP/WireGuard 等"
|
||||
|
||||
msgid "Enable GFW IPSet"
|
||||
msgstr "启用 GFW IPSet"
|
@ -137,16 +137,16 @@ stop_pdnsd() {
|
||||
|
||||
|
||||
start(){
|
||||
/etc/mwan3helper/genipset.sh cn '/etc/mwan3helper/all_cn.txt'
|
||||
/etc/mwan3helper/genipset.sh ct '/etc/mwan3helper/chinatelecom.txt'
|
||||
/etc/mwan3helper/genipset.sh cnc '/etc/mwan3helper/unicom_cnc.txt'
|
||||
/etc/mwan3helper/genipset.sh cmcc '/etc/mwan3helper/cmcc.txt'
|
||||
/etc/mwan3helper/genipset.sh crtc '/etc/mwan3helper/crtc.txt'
|
||||
/etc/mwan3helper/genipset.sh cernet '/etc/mwan3helper/cernet.txt'
|
||||
/etc/mwan3helper/genipset.sh gwbn '/etc/mwan3helper/gwbn.txt'
|
||||
/etc/mwan3helper/genipset.sh othernet '/etc/mwan3helper/othernet.txt'
|
||||
en=$(uci get mwan3helper.config.enabled 2>/dev/null)
|
||||
if [ $en -eq 1 ]; then
|
||||
/etc/mwan3helper/genipset.sh cn '/etc/mwan3helper/all_cn.txt'
|
||||
/etc/mwan3helper/genipset.sh ct '/etc/mwan3helper/chinatelecom.txt'
|
||||
/etc/mwan3helper/genipset.sh cnc '/etc/mwan3helper/unicom_cnc.txt'
|
||||
/etc/mwan3helper/genipset.sh cmcc '/etc/mwan3helper/cmcc.txt'
|
||||
/etc/mwan3helper/genipset.sh crtc '/etc/mwan3helper/crtc.txt'
|
||||
/etc/mwan3helper/genipset.sh cernet '/etc/mwan3helper/cernet.txt'
|
||||
/etc/mwan3helper/genipset.sh gwbn '/etc/mwan3helper/gwbn.txt'
|
||||
/etc/mwan3helper/genipset.sh othernet '/etc/mwan3helper/othernet.txt'
|
||||
start_pdnsd
|
||||
mkdir -p /tmp/etc/dnsmasq-mwan3.d
|
||||
ipset -N gfwlist hash:net 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user