luci: Fix and optimize some issues
This commit is contained in:
parent
1dd5fda2ca
commit
ed708acc07
@ -6,7 +6,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-passwall
|
PKG_NAME:=luci-app-passwall
|
||||||
PKG_VERSION:=4.75-2
|
PKG_VERSION:=4.75-3
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
@ -370,22 +370,20 @@ o.rmempty = false
|
|||||||
if api.is_finded("chinadns-ng") then
|
if api.is_finded("chinadns-ng") then
|
||||||
o = s:taboption("DNS", Flag, "chinadns_ng", translate("ChinaDNS-NG"), translate("The effect is better, but will increase the memory."))
|
o = s:taboption("DNS", Flag, "chinadns_ng", translate("ChinaDNS-NG"), translate("The effect is better, but will increase the memory."))
|
||||||
o.default = "0"
|
o.default = "0"
|
||||||
chinadns_ng_default_tag = s:taboption("DNS", ListValue, "chinadns_ng_default_tag", translate("ChinaDNS-NG Domain Default Tag"))
|
o:depends({remote_fakedns = false, use_gfw_list = true})
|
||||||
chinadns_ng_default_tag.default = "smart"
|
o:depends({remote_fakedns = false, chn_list = "direct"})
|
||||||
chinadns_ng_default_tag:value("smart", translate("Smart DNS"))
|
|
||||||
chinadns_ng_default_tag:value("gfw", translate("Remote DNS"))
|
o = s:taboption("DNS", ListValue, "chinadns_ng_default_tag", translate("ChinaDNS-NG Domain Default Tag"))
|
||||||
chinadns_ng_default_tag:value("chn", translate("Direct DNS"))
|
o.default = "smart"
|
||||||
chinadns_ng_default_tag.description = "<ul>"
|
o:value("smart", translate("Smart DNS"))
|
||||||
|
o:value("gfw", translate("Remote DNS"))
|
||||||
|
o:value("chn", translate("Direct DNS"))
|
||||||
|
o.description = "<ul>"
|
||||||
.. "<li>" .. translate("Forward to both remote and direct DNS, if the direct DNS resolution result is a mainland China ip, then use the direct result, otherwise use the remote result") .. "</li>"
|
.. "<li>" .. translate("Forward to both remote and direct DNS, if the direct DNS resolution result is a mainland China ip, then use the direct result, otherwise use the remote result") .. "</li>"
|
||||||
.. "<li>" .. translate("Remote DNS can avoid more DNS leaks, but some domestic domain names maybe to proxy!") .. "</li>"
|
.. "<li>" .. translate("Remote DNS can avoid more DNS leaks, but some domestic domain names maybe to proxy!") .. "</li>"
|
||||||
.. "<li>" .. translate("Direct DNS Internet experience may be better, but DNS will be leaked!") .. "</li>"
|
.. "<li>" .. translate("Direct DNS Internet experience may be better, but DNS will be leaked!") .. "</li>"
|
||||||
.. "</ul>"
|
.. "</ul>"
|
||||||
chinadns_ng_default_tag:depends("chinadns_ng", true)
|
o:depends("chinadns_ng", true)
|
||||||
o:depends({dns_mode = "dns2socks"})
|
|
||||||
o:depends({dns_mode = "dns2tcp"})
|
|
||||||
o:depends({dns_mode = "sing-box", remote_fakedns = false})
|
|
||||||
o:depends({dns_mode = "xray"})
|
|
||||||
o:depends({dns_mode = "udp"})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
o = s:taboption("DNS", ListValue, "use_default_dns", translate("Default DNS"))
|
o = s:taboption("DNS", ListValue, "use_default_dns", translate("Default DNS"))
|
||||||
@ -397,9 +395,11 @@ o.description = translate("The default DNS used when not in the domain name rule
|
|||||||
.. "<li>" .. translate("Remote DNS can avoid more DNS leaks, but some domestic domain names maybe to proxy!") .. "</li>"
|
.. "<li>" .. translate("Remote DNS can avoid more DNS leaks, but some domestic domain names maybe to proxy!") .. "</li>"
|
||||||
.. "<li>" .. translate("Direct DNS Internet experience may be better, but DNS will be leaked!") .. "</li>"
|
.. "<li>" .. translate("Direct DNS Internet experience may be better, but DNS will be leaked!") .. "</li>"
|
||||||
.. "</ul>"
|
.. "</ul>"
|
||||||
|
local _depends = {tcp_proxy_mode = "proxy"}
|
||||||
if api.is_finded("chinadns-ng") then
|
if api.is_finded("chinadns-ng") then
|
||||||
o:depends("chinadns_ng", false)
|
_depends["chinadns_ng"] = false
|
||||||
end
|
end
|
||||||
|
o:depends(_depends)
|
||||||
|
|
||||||
o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"), translate("Try this feature if the rule modification does not take effect."))
|
o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"), translate("Try this feature if the rule modification does not take effect."))
|
||||||
o.inputstyle = "remove"
|
o.inputstyle = "remove"
|
||||||
|
@ -1701,10 +1701,10 @@ UDP_PROXY_MODE=$(config_t_get global udp_proxy_mode proxy)
|
|||||||
[ "${UDP_PROXY_MODE}" != "disable" ] && UDP_PROXY_MODE="proxy"
|
[ "${UDP_PROXY_MODE}" != "disable" ] && UDP_PROXY_MODE="proxy"
|
||||||
LOCALHOST_TCP_PROXY_MODE=$(config_t_get global localhost_tcp_proxy_mode default)
|
LOCALHOST_TCP_PROXY_MODE=$(config_t_get global localhost_tcp_proxy_mode default)
|
||||||
LOCALHOST_UDP_PROXY_MODE=$(config_t_get global localhost_udp_proxy_mode default)
|
LOCALHOST_UDP_PROXY_MODE=$(config_t_get global localhost_udp_proxy_mode default)
|
||||||
|
[ "${LOCALHOST_TCP_PROXY_MODE}" == "default" ] && LOCALHOST_TCP_PROXY_MODE=$TCP_PROXY_MODE
|
||||||
|
[ "${LOCALHOST_UDP_PROXY_MODE}" == "default" ] && LOCALHOST_UDP_PROXY_MODE=$UDP_PROXY_MODE
|
||||||
[ "${LOCALHOST_TCP_PROXY_MODE}" != "disable" ] && LOCALHOST_TCP_PROXY_MODE="proxy"
|
[ "${LOCALHOST_TCP_PROXY_MODE}" != "disable" ] && LOCALHOST_TCP_PROXY_MODE="proxy"
|
||||||
[ "${LOCALHOST_UDP_PROXY_MODE}" != "disable" ] && LOCALHOST_UDP_PROXY_MODE="proxy"
|
[ "${LOCALHOST_UDP_PROXY_MODE}" != "disable" ] && LOCALHOST_UDP_PROXY_MODE="proxy"
|
||||||
[ "$LOCALHOST_TCP_PROXY_MODE" == "default" ] && LOCALHOST_TCP_PROXY_MODE=$TCP_PROXY_MODE
|
|
||||||
[ "$LOCALHOST_UDP_PROXY_MODE" == "default" ] && LOCALHOST_UDP_PROXY_MODE=$UDP_PROXY_MODE
|
|
||||||
DNS_SHUNT="dnsmasq"
|
DNS_SHUNT="dnsmasq"
|
||||||
DNS_MODE=$(config_t_get global dns_mode dns2tcp)
|
DNS_MODE=$(config_t_get global dns_mode dns2tcp)
|
||||||
DNS_CACHE=$(config_t_get global dns_cache 0)
|
DNS_CACHE=$(config_t_get global dns_cache 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user