diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua index 00f54184e..d4edf538f 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua @@ -13,7 +13,6 @@ local fs = api.fs local sys = api.sys local has_singbox = api.finded_com("sing-box") local has_xray = api.finded_com("xray") -local has_geoview = api.is_finded("geoview") local has_gfwlist = fs.access("/usr/share/passwall/rules/gfwlist") local has_chnlist = fs.access("/usr/share/passwall/rules/chnlist") local has_chnroute = fs.access("/usr/share/passwall/rules/chnroute") @@ -24,9 +23,7 @@ end local nodes_table = {} for k, e in ipairs(api.get_valid_nodes()) do - if not(e.type == "sing-box" and e.protocol == "_shunt" and not has_geoview) then --Sing-Box分流节点缺少geoview组件时不允许使用 - nodes_table[#nodes_table + 1] = e - end + nodes_table[#nodes_table + 1] = e end local dynamicList_write = function(self, section, value) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index 4cf51591c..f8f2d9b11 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -4,7 +4,6 @@ local datatypes = api.datatypes local fs = api.fs local has_singbox = api.finded_com("sing-box") local has_xray = api.finded_com("xray") -local has_geoview = api.is_finded("geoview") local has_gfwlist = fs.access("/usr/share/passwall/rules/gfwlist") local has_chnlist = fs.access("/usr/share/passwall/rules/chnlist") local has_chnroute = fs.access("/usr/share/passwall/rules/chnroute") @@ -15,9 +14,7 @@ api.set_apply_on_parse(m) local nodes_table = {} for k, e in ipairs(api.get_valid_nodes()) do - if not(e.type == "sing-box" and e.protocol == "_shunt" and not has_geoview) then --Sing-Box分流节点缺少geoview组件时不允许使用 - nodes_table[#nodes_table + 1] = e - end + nodes_table[#nodes_table + 1] = e end local normal_list = {} @@ -168,7 +165,7 @@ if (has_singbox or has_xray) and #nodes_table > 0 then local vid = v.id -- shunt node type, Sing-Box or Xray local type = s:taboption("Main", ListValue, vid .. "-type", translate("Type")) - if has_singbox and has_geoview then + if has_singbox then type:value("sing-box", "Sing-Box") end if has_xray then diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua index c5b4a72e9..23ac5ed90 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua @@ -3,7 +3,6 @@ local m, s = ... local api = require "luci.passwall.api" local singbox_bin = api.finded_com("sing-box") -local geoview_bin = api.is_finded("geoview") if not singbox_bin then return @@ -58,9 +57,7 @@ if singbox_tags:find("with_quic") then o:value("hysteria2", "Hysteria2") end o:value("_urltest", translate("URLTest")) -if geoview_bin then --缺少geoview时禁用分流 - o:value("_shunt", translate("Shunt")) -end +o:value("_shunt", translate("Shunt")) o:value("_iface", translate("Custom Interface")) o = s:option(Value, _n("iface"), translate("Interface")) diff --git a/patch-luci-app-passwall.patch b/patch-luci-app-passwall.patch index 64a4e8041..7f4f29cf1 100644 --- a/patch-luci-app-passwall.patch +++ b/patch-luci-app-passwall.patch @@ -20,10 +20,10 @@ index 485b59c..6d2ddf4 100644 define Package/$(PKG_NAME)/postrm diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua -index 7bdfb3e..4cf5159 100644 +index 425cd70..f8f2d9b 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua -@@ -509,6 +509,12 @@ o:value("9.9.9.9", "9.9.9.9 (Quad9)") +@@ -506,6 +506,12 @@ o:value("9.9.9.9", "9.9.9.9 (Quad9)") o:value("149.112.112.112", "149.112.112.112 (Quad9)") o:value("208.67.220.220", "208.67.220.220 (OpenDNS)") o:value("208.67.222.222", "208.67.222.222 (OpenDNS)") @@ -36,7 +36,7 @@ index 7bdfb3e..4cf5159 100644 o:depends({dns_mode = "dns2socks"}) o:depends({dns_mode = "tcp"}) o:depends({dns_mode = "udp"}) -@@ -608,7 +614,7 @@ if api.is_finded("smartdns") then +@@ -605,7 +611,7 @@ if api.is_finded("smartdns") then end o = s:taboption("DNS", Flag, "dns_redirect", translate("DNS Redirect"), translate("Force special DNS server to need proxy devices."))