update 2023-10-11 23:37:31
This commit is contained in:
parent
4878378678
commit
6b04340d8d
|
@ -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.70-10
|
PKG_VERSION:=4.71-1
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
|
|
@ -240,11 +240,31 @@ if has_xray then
|
||||||
o:value("xray", "Xray")
|
o:value("xray", "Xray")
|
||||||
end
|
end
|
||||||
|
|
||||||
o = s:option(ListValue, "v2ray_dns_mode", " ")
|
o = s:option(ListValue, "xray_dns_mode", " ")
|
||||||
|
o:value("tcp", "TCP")
|
||||||
|
o:value("tcp+doh", "TCP + DoH (" .. translate("A/AAAA type") .. ")")
|
||||||
|
o:depends("dns_mode", "xray")
|
||||||
|
o.cfgvalue = function(self, section)
|
||||||
|
return m:get(section, "v2ray_dns_mode")
|
||||||
|
end
|
||||||
|
o.write = function(self, section, value)
|
||||||
|
if dns_mode:formvalue(section) == "xray" then
|
||||||
|
return m:set(section, "v2ray_dns_mode", value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
o = s:option(ListValue, "singbox_dns_mode", " ")
|
||||||
o:value("tcp", "TCP")
|
o:value("tcp", "TCP")
|
||||||
o:value("doh", "DoH")
|
o:value("doh", "DoH")
|
||||||
o:depends("dns_mode", "sing-box")
|
o:depends("dns_mode", "sing-box")
|
||||||
o:depends("dns_mode", "xray")
|
o.cfgvalue = function(self, section)
|
||||||
|
return m:get(section, "v2ray_dns_mode")
|
||||||
|
end
|
||||||
|
o.write = function(self, section, value)
|
||||||
|
if dns_mode:formvalue(section) == "sing-box" then
|
||||||
|
return m:set(section, "v2ray_dns_mode", value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
---- DNS Forward
|
---- DNS Forward
|
||||||
o = s:option(Value, "remote_dns", translate("Remote DNS"))
|
o = s:option(Value, "remote_dns", translate("Remote DNS"))
|
||||||
|
@ -256,8 +276,10 @@ o:value("8.8.8.8", "8.8.8.8 (Google)")
|
||||||
o:value("9.9.9.9", "9.9.9.9 (Quad9-Recommended)")
|
o:value("9.9.9.9", "9.9.9.9 (Quad9-Recommended)")
|
||||||
o:value("208.67.220.220", "208.67.220.220 (OpenDNS)")
|
o:value("208.67.220.220", "208.67.220.220 (OpenDNS)")
|
||||||
o:value("208.67.222.222", "208.67.222.222 (OpenDNS)")
|
o:value("208.67.222.222", "208.67.222.222 (OpenDNS)")
|
||||||
o:depends("dns_mode", "dns2socks")
|
o:depends({dns_mode = "dns2socks"})
|
||||||
o:depends("v2ray_dns_mode", "tcp")
|
o:depends({xray_dns_mode = "tcp"})
|
||||||
|
o:depends({xray_dns_mode = "tcp+doh"})
|
||||||
|
o:depends({singbox_dns_mode = "tcp"})
|
||||||
|
|
||||||
if has_singbox or has_xray then
|
if has_singbox or has_xray then
|
||||||
o = s:option(Value, "remote_dns_doh", translate("Remote DNS DoH"))
|
o = s:option(Value, "remote_dns_doh", translate("Remote DNS DoH"))
|
||||||
|
@ -293,23 +315,25 @@ if has_singbox or has_xray then
|
||||||
end
|
end
|
||||||
return nil, translate("DoH request address") .. " " .. translate("Format must be:") .. " URL,IP"
|
return nil, translate("DoH request address") .. " " .. translate("Format must be:") .. " URL,IP"
|
||||||
end
|
end
|
||||||
o:depends("v2ray_dns_mode", "doh")
|
o:depends({xray_dns_mode = "tcp+doh"})
|
||||||
|
o:depends({singbox_dns_mode = "doh"})
|
||||||
|
|
||||||
if has_xray then
|
if has_xray then
|
||||||
o = s:option(Value, "dns_client_ip", translate("EDNS Client Subnet"))
|
o = s:option(Value, "dns_client_ip", translate("EDNS Client Subnet"))
|
||||||
o.datatype = "ipaddr"
|
o.datatype = "ipaddr"
|
||||||
o:depends({dns_mode = "xray", v2ray_dns_mode = "tcp"})
|
o:depends({dns_mode = "xray"})
|
||||||
o:depends({dns_mode = "xray", v2ray_dns_mode = "doh"})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if api.is_finded("chinadns-ng") then
|
if api.is_finded("chinadns-ng") then
|
||||||
o = s:option(Flag, "chinadns_ng", translate("ChinaDNS-NG"), translate("The effect is better, but will increase the memory."))
|
o = s:option(Flag, "chinadns_ng", translate("ChinaDNS-NG"), translate("The effect is better, but will increase the memory."))
|
||||||
o.default = "0"
|
o.default = "0"
|
||||||
o:depends({ tcp_proxy_mode = "gfwlist", dns_mode = "dns2socks"})
|
o:depends({ tcp_proxy_mode = "gfwlist", dns_mode = "dns2socks" })
|
||||||
o:depends({ tcp_proxy_mode = "gfwlist", dns_mode = "xray"})
|
o:depends({ tcp_proxy_mode = "gfwlist", dns_mode = "xray" })
|
||||||
o:depends({ tcp_proxy_mode = "chnroute", dns_mode = "dns2socks"})
|
o:depends({ tcp_proxy_mode = "gfwlist", dns_mode = "sing-box" })
|
||||||
o:depends({ tcp_proxy_mode = "chnroute", dns_mode = "xray"})
|
o:depends({ tcp_proxy_mode = "chnroute", dns_mode = "dns2socks" })
|
||||||
|
o:depends({ tcp_proxy_mode = "chnroute", dns_mode = "xray" })
|
||||||
|
o:depends({ tcp_proxy_mode = "chnroute", dns_mode = "sing-box" })
|
||||||
end
|
end
|
||||||
|
|
||||||
if has_chnlist then
|
if has_chnlist then
|
||||||
|
@ -323,7 +347,8 @@ if has_chnlist then
|
||||||
.. "</ul>"
|
.. "</ul>"
|
||||||
local _depends = {
|
local _depends = {
|
||||||
{ dns_mode = "dns2socks" },
|
{ dns_mode = "dns2socks" },
|
||||||
{ dns_mode = "xray" }
|
{ dns_mode = "xray" },
|
||||||
|
{ dns_mode = "sing-box" },
|
||||||
}
|
}
|
||||||
for i, d in ipairs(_depends) do
|
for i, d in ipairs(_depends) do
|
||||||
d["tcp_proxy_mode"] = "chnroute"
|
d["tcp_proxy_mode"] = "chnroute"
|
||||||
|
|
|
@ -106,6 +106,29 @@ function trim(s)
|
||||||
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 分割字符串
|
||||||
|
function split(full, sep)
|
||||||
|
if full then
|
||||||
|
full = full:gsub("%z", "") -- 这里不是很清楚 有时候结尾带个\0
|
||||||
|
local off, result = 1, {}
|
||||||
|
while true do
|
||||||
|
local nStart, nEnd = full:find(sep, off)
|
||||||
|
if not nEnd then
|
||||||
|
local res = string.sub(full, off, string.len(full))
|
||||||
|
if #res > 0 then -- 过滤掉 \0
|
||||||
|
table.insert(result, res)
|
||||||
|
end
|
||||||
|
break
|
||||||
|
else
|
||||||
|
table.insert(result, string.sub(full, off, nStart - 1))
|
||||||
|
off = nEnd + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
function is_exist(table, value)
|
function is_exist(table, value)
|
||||||
for index, k in ipairs(table) do
|
for index, k in ipairs(table) do
|
||||||
if k == value then
|
if k == value then
|
||||||
|
|
|
@ -513,9 +513,6 @@ function gen_config(var)
|
||||||
local tcp_proxy_way = var["-tcp_proxy_way"] or "redirect"
|
local tcp_proxy_way = var["-tcp_proxy_way"] or "redirect"
|
||||||
local tcp_redir_port = var["-tcp_redir_port"]
|
local tcp_redir_port = var["-tcp_redir_port"]
|
||||||
local udp_redir_port = var["-udp_redir_port"]
|
local udp_redir_port = var["-udp_redir_port"]
|
||||||
local sniffing = var["-sniffing"]
|
|
||||||
local route_only = var["-route_only"]
|
|
||||||
local buffer_size = var["-buffer_size"]
|
|
||||||
local local_socks_address = var["-local_socks_address"] or "0.0.0.0"
|
local local_socks_address = var["-local_socks_address"] or "0.0.0.0"
|
||||||
local local_socks_port = var["-local_socks_port"]
|
local local_socks_port = var["-local_socks_port"]
|
||||||
local local_socks_username = var["-local_socks_username"]
|
local local_socks_username = var["-local_socks_username"]
|
||||||
|
@ -544,6 +541,8 @@ function gen_config(var)
|
||||||
local inbounds = {}
|
local inbounds = {}
|
||||||
local outbounds = {}
|
local outbounds = {}
|
||||||
|
|
||||||
|
local xray_settings = uci:get_all(appname, "@global_xray[0]") or {}
|
||||||
|
|
||||||
if node_id then
|
if node_id then
|
||||||
local node = uci:get_all(appname, node_id)
|
local node = uci:get_all(appname, node_id)
|
||||||
if local_socks_port then
|
if local_socks_port then
|
||||||
|
@ -588,7 +587,13 @@ function gen_config(var)
|
||||||
protocol = "dokodemo-door",
|
protocol = "dokodemo-door",
|
||||||
settings = {network = "tcp,udp", followRedirect = true},
|
settings = {network = "tcp,udp", followRedirect = true},
|
||||||
streamSettings = {sockopt = {tproxy = "tproxy"}},
|
streamSettings = {sockopt = {tproxy = "tproxy"}},
|
||||||
sniffing = {enabled = sniffing and true or false, destOverride = {"http", "tls", "quic"}, metadataOnly = false, routeOnly = route_only and true or nil, domainsExcluded = (sniffing and not route_only) and get_domain_excluded() or nil}
|
sniffing = {
|
||||||
|
enabled = xray_settings.sniffing == "1" and true or false,
|
||||||
|
destOverride = {"http", "tls", "quic"},
|
||||||
|
metadataOnly = false,
|
||||||
|
routeOnly = (xray_settings.sniffing == "1" and xray_settings.route_only == "1") and true or nil,
|
||||||
|
domainsExcluded = (xray_settings.sniffing == "1" and xray_settings.route_only == "0") and get_domain_excluded() or nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if tcp_redir_port then
|
if tcp_redir_port then
|
||||||
|
@ -1173,7 +1178,7 @@ function gen_config(var)
|
||||||
-- connIdle = 300,
|
-- connIdle = 300,
|
||||||
-- uplinkOnly = 2,
|
-- uplinkOnly = 2,
|
||||||
-- downlinkOnly = 5,
|
-- downlinkOnly = 5,
|
||||||
bufferSize = buffer_size and tonumber(buffer_size) or nil,
|
bufferSize = xray_settings.buffer_size and tonumber(xray_settings.buffer_size) or nil,
|
||||||
statsUserUplink = false,
|
statsUserUplink = false,
|
||||||
statsUserDownlink = false
|
statsUserDownlink = false
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,8 +92,6 @@ config nodes 'myshunt'
|
||||||
option protocol '_shunt'
|
option protocol '_shunt'
|
||||||
option DirectGame '_direct'
|
option DirectGame '_direct'
|
||||||
option ProxyGame '_default'
|
option ProxyGame '_default'
|
||||||
option AD '_blackhole'
|
|
||||||
option BT '_direct'
|
|
||||||
option Proxy '_default'
|
option Proxy '_default'
|
||||||
option Netflix '_default'
|
option Netflix '_default'
|
||||||
option OpenAI '_default'
|
option OpenAI '_default'
|
||||||
|
@ -161,14 +159,6 @@ config shunt_rules 'ProxyGame'
|
||||||
domain:store.steampowered.com
|
domain:store.steampowered.com
|
||||||
'
|
'
|
||||||
|
|
||||||
config shunt_rules 'AD'
|
|
||||||
option remarks 'AD'
|
|
||||||
option domain_list 'geosite:category-ads-all'
|
|
||||||
|
|
||||||
config shunt_rules 'BT'
|
|
||||||
option remarks 'BT'
|
|
||||||
option protocol 'bittorrent'
|
|
||||||
|
|
||||||
config shunt_rules 'OpenAI'
|
config shunt_rules 'OpenAI'
|
||||||
option remarks 'OpenAI'
|
option remarks 'OpenAI'
|
||||||
option domain_list 'geosite:openai'
|
option domain_list 'geosite:openai'
|
||||||
|
|
|
@ -433,14 +433,6 @@ run_xray() {
|
||||||
[ -n "$dns_query_strategy" ] && _extra_param="${_extra_param} -dns_query_strategy ${dns_query_strategy}"
|
[ -n "$dns_query_strategy" ] && _extra_param="${_extra_param} -dns_query_strategy ${dns_query_strategy}"
|
||||||
[ -n "$dns_client_ip" ] && _extra_param="${_extra_param} -dns_client_ip ${dns_client_ip}"
|
[ -n "$dns_client_ip" ] && _extra_param="${_extra_param} -dns_client_ip ${dns_client_ip}"
|
||||||
[ -n "$dns_cache" ] && _extra_param="${_extra_param} -dns_cache ${dns_cache}"
|
[ -n "$dns_cache" ] && _extra_param="${_extra_param} -dns_cache ${dns_cache}"
|
||||||
local sniffing=$(config_t_get global_forwarding sniffing 1)
|
|
||||||
[ "${sniffing}" = "1" ] && {
|
|
||||||
_extra_param="${_extra_param} -sniffing 1"
|
|
||||||
local route_only=$(config_t_get global_forwarding route_only 0)
|
|
||||||
[ "${route_only}" = "1" ] && _extra_param="${_extra_param} -route_only 1"
|
|
||||||
}
|
|
||||||
local buffer_size=$(config_t_get global_forwarding buffer_size)
|
|
||||||
[ -n "${buffer_size}" ] && _extra_param="${_extra_param} -buffer_size ${buffer_size}"
|
|
||||||
[ -n "${remote_dns_tcp_server}" ] && {
|
[ -n "${remote_dns_tcp_server}" ] && {
|
||||||
local _dns=$(get_first_dns remote_dns_tcp_server 53 | sed 's/#/:/g')
|
local _dns=$(get_first_dns remote_dns_tcp_server 53 | sed 's/#/:/g')
|
||||||
local _dns_address=$(echo ${_dns} | awk -F ':' '{print $1}')
|
local _dns_address=$(echo ${_dns} | awk -F ':' '{print $1}')
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -375,7 +375,6 @@
|
||||||
103.118.244.0/22
|
103.118.244.0/22
|
||||||
103.118.248.0/22
|
103.118.248.0/22
|
||||||
103.118.252.0/22
|
103.118.252.0/22
|
||||||
103.118.36.0/22
|
|
||||||
103.118.52.0/22
|
103.118.52.0/22
|
||||||
103.118.56.0/22
|
103.118.56.0/22
|
||||||
103.118.60.0/22
|
103.118.60.0/22
|
||||||
|
@ -1344,6 +1343,7 @@
|
||||||
103.217.8.0/22
|
103.217.8.0/22
|
||||||
103.218.12.0/22
|
103.218.12.0/22
|
||||||
103.218.16.0/22
|
103.218.16.0/22
|
||||||
|
103.218.178.0/23
|
||||||
103.218.192.0/22
|
103.218.192.0/22
|
||||||
103.218.196.0/22
|
103.218.196.0/22
|
||||||
103.218.20.0/22
|
103.218.20.0/22
|
||||||
|
@ -3034,6 +3034,7 @@
|
||||||
103.75.144.0/22
|
103.75.144.0/22
|
||||||
103.75.152.0/22
|
103.75.152.0/22
|
||||||
103.75.236.0/24
|
103.75.236.0/24
|
||||||
|
103.75.82.0/23
|
||||||
103.75.88.0/22
|
103.75.88.0/22
|
||||||
103.75.92.0/22
|
103.75.92.0/22
|
||||||
103.76.216.0/22
|
103.76.216.0/22
|
||||||
|
@ -4960,6 +4961,7 @@
|
||||||
202.143.56.0/21
|
202.143.56.0/21
|
||||||
202.144.196.0/22
|
202.144.196.0/22
|
||||||
202.146.160.0/20
|
202.146.160.0/20
|
||||||
|
202.146.184.0/23
|
||||||
202.146.186.0/24
|
202.146.186.0/24
|
||||||
202.146.188.0/22
|
202.146.188.0/22
|
||||||
202.146.196.0/22
|
202.146.196.0/22
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,7 +26,6 @@
|
||||||
2001:df0:25c0::/48
|
2001:df0:25c0::/48
|
||||||
2001:df0:26c0::/48
|
2001:df0:26c0::/48
|
||||||
2001:df0:27e::/48
|
2001:df0:27e::/48
|
||||||
2001:df0:2d80::/48
|
|
||||||
2001:df0:2e00::/48
|
2001:df0:2e00::/48
|
||||||
2001:df0:2e80::/48
|
2001:df0:2e80::/48
|
||||||
2001:df0:423::/48
|
2001:df0:423::/48
|
||||||
|
@ -52,7 +51,6 @@
|
||||||
2001:df1:bd80::/48
|
2001:df1:bd80::/48
|
||||||
2001:df1:c80::/48
|
2001:df1:c80::/48
|
||||||
2001:df1:c900::/48
|
2001:df1:c900::/48
|
||||||
2001:df1:d100::/48
|
|
||||||
2001:df1:d180::/48
|
2001:df1:d180::/48
|
||||||
2001:df1:da00::/48
|
2001:df1:da00::/48
|
||||||
2001:df1:f480::/48
|
2001:df1:f480::/48
|
||||||
|
@ -450,6 +448,8 @@
|
||||||
2401:33c0::/32
|
2401:33c0::/32
|
||||||
2401:3440::/32
|
2401:3440::/32
|
||||||
2401:3480::/32
|
2401:3480::/32
|
||||||
|
2401:34a0::/32
|
||||||
|
2401:34a1::/32
|
||||||
2401:34c0::/32
|
2401:34c0::/32
|
||||||
2401:3640::/32
|
2401:3640::/32
|
||||||
2401:3780::/32
|
2401:3780::/32
|
||||||
|
@ -459,6 +459,7 @@
|
||||||
2401:3a00::/32
|
2401:3a00::/32
|
||||||
2401:3a80::/32
|
2401:3a80::/32
|
||||||
2401:3b80::/32
|
2401:3b80::/32
|
||||||
|
2401:3c20::/32
|
||||||
2401:3c80::/32
|
2401:3c80::/32
|
||||||
2401:3d80::/32
|
2401:3d80::/32
|
||||||
2401:3e80::/32
|
2401:3e80::/32
|
||||||
|
@ -694,7 +695,6 @@
|
||||||
2402:6bc0::/32
|
2402:6bc0::/32
|
||||||
2402:6e00::/32
|
2402:6e00::/32
|
||||||
2402:6e80::/32
|
2402:6e80::/32
|
||||||
2402:6ec0::/32
|
|
||||||
2402:6f40::/32
|
2402:6f40::/32
|
||||||
2402:6fc0::/32
|
2402:6fc0::/32
|
||||||
2402:7040::/32
|
2402:7040::/32
|
||||||
|
@ -1525,7 +1525,6 @@
|
||||||
2405:f940::/32
|
2405:f940::/32
|
||||||
2405:fdc0::/32
|
2405:fdc0::/32
|
||||||
2405:fe80::/32
|
2405:fe80::/32
|
||||||
2405:fec0::/32
|
|
||||||
2405:ff80::/32
|
2405:ff80::/32
|
||||||
2406:1080::/32
|
2406:1080::/32
|
||||||
2406:1100::/32
|
2406:1100::/32
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -102,7 +102,6 @@
|
||||||
6parkbbs.com
|
6parkbbs.com
|
||||||
6parker.com
|
6parker.com
|
||||||
6parknews.com
|
6parknews.com
|
||||||
7-zip.org
|
|
||||||
7capture.com
|
7capture.com
|
||||||
7cow.com
|
7cow.com
|
||||||
8-d.com
|
8-d.com
|
||||||
|
@ -1061,6 +1060,7 @@ civildisobediencemovement.org
|
||||||
civilhrfront.org
|
civilhrfront.org
|
||||||
civiliangunner.com
|
civiliangunner.com
|
||||||
civilmedia.tw
|
civilmedia.tw
|
||||||
|
civitai.com
|
||||||
ck101.com
|
ck101.com
|
||||||
cl.d0z.net
|
cl.d0z.net
|
||||||
clarionproject.org
|
clarionproject.org
|
||||||
|
@ -2077,6 +2077,7 @@ goagent.biz
|
||||||
goagent.codeplex.com
|
goagent.codeplex.com
|
||||||
goagentplus.com
|
goagentplus.com
|
||||||
gobet.cc
|
gobet.cc
|
||||||
|
godaddy.com
|
||||||
godfootsteps.org
|
godfootsteps.org
|
||||||
godns.work
|
godns.work
|
||||||
godoc.org
|
godoc.org
|
||||||
|
@ -3141,6 +3142,7 @@ lflinkup.net
|
||||||
lflinkup.org
|
lflinkup.org
|
||||||
lhakar.org
|
lhakar.org
|
||||||
lhasocialwork.org
|
lhasocialwork.org
|
||||||
|
li.taipei
|
||||||
liangyou.net
|
liangyou.net
|
||||||
liangzhichuanmei.com
|
liangzhichuanmei.com
|
||||||
lianyue.net
|
lianyue.net
|
||||||
|
@ -3454,6 +3456,7 @@ molihua.org
|
||||||
mondex.org
|
mondex.org
|
||||||
money-link.com.tw
|
money-link.com.tw
|
||||||
moneyhome.biz
|
moneyhome.biz
|
||||||
|
monica.im
|
||||||
monitorchina.org
|
monitorchina.org
|
||||||
monocloud.me
|
monocloud.me
|
||||||
monster.com
|
monster.com
|
||||||
|
@ -3923,7 +3926,6 @@ padmanet.com
|
||||||
page.bid.yahoo.com
|
page.bid.yahoo.com
|
||||||
page.link
|
page.link
|
||||||
page2rss.com
|
page2rss.com
|
||||||
pages.dev
|
|
||||||
pagodabox.com
|
pagodabox.com
|
||||||
palacemoon.com
|
palacemoon.com
|
||||||
paldengyal.com
|
paldengyal.com
|
||||||
|
@ -5157,7 +5159,6 @@ tracfone.com
|
||||||
tradingview.com
|
tradingview.com
|
||||||
trans.wenweipo.com
|
trans.wenweipo.com
|
||||||
translate.goog
|
translate.goog
|
||||||
translate.google
|
|
||||||
transparency.org
|
transparency.org
|
||||||
treemall.com.tw
|
treemall.com.tw
|
||||||
trendsmap.com
|
trendsmap.com
|
||||||
|
@ -5555,7 +5556,6 @@ vovo2000.com
|
||||||
voxer.com
|
voxer.com
|
||||||
voy.com
|
voy.com
|
||||||
vpn.ac
|
vpn.ac
|
||||||
vpn.cjb.net
|
|
||||||
vpn.cmu.edu
|
vpn.cmu.edu
|
||||||
vpn.sv.cmu.edu
|
vpn.sv.cmu.edu
|
||||||
vpn4all.com
|
vpn4all.com
|
||||||
|
|
|
@ -16,6 +16,7 @@ local datatypes = require "luci.cbi.datatypes"
|
||||||
-- so caching them is worth the effort
|
-- so caching them is worth the effort
|
||||||
local tinsert = table.insert
|
local tinsert = table.insert
|
||||||
local ssub, slen, schar, sbyte, sformat, sgsub = string.sub, string.len, string.char, string.byte, string.format, string.gsub
|
local ssub, slen, schar, sbyte, sformat, sgsub = string.sub, string.len, string.char, string.byte, string.format, string.gsub
|
||||||
|
local split = api.split
|
||||||
local jsonParse, jsonStringify = luci.jsonc.parse, luci.jsonc.stringify
|
local jsonParse, jsonStringify = luci.jsonc.parse, luci.jsonc.stringify
|
||||||
local base64Decode = api.base64Decode
|
local base64Decode = api.base64Decode
|
||||||
local uci = luci.model.uci.cursor()
|
local uci = luci.model.uci.cursor()
|
||||||
|
@ -317,28 +318,6 @@ do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 分割字符串
|
|
||||||
local function split(full, sep)
|
|
||||||
if full then
|
|
||||||
full = full:gsub("%z", "") -- 这里不是很清楚 有时候结尾带个\0
|
|
||||||
local off, result = 1, {}
|
|
||||||
while true do
|
|
||||||
local nStart, nEnd = full:find(sep, off)
|
|
||||||
if not nEnd then
|
|
||||||
local res = ssub(full, off, slen(full))
|
|
||||||
if #res > 0 then -- 过滤掉 \0
|
|
||||||
tinsert(result, res)
|
|
||||||
end
|
|
||||||
break
|
|
||||||
else
|
|
||||||
tinsert(result, ssub(full, off, nStart - 1))
|
|
||||||
off = nEnd + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
return {}
|
|
||||||
end
|
|
||||||
-- urlencode
|
-- urlencode
|
||||||
-- local function get_urlencode(c) return sformat("%%%02X", sbyte(c)) end
|
-- local function get_urlencode(c) return sformat("%%%02X", sbyte(c)) end
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-passwall2
|
PKG_NAME:=luci-app-passwall2
|
||||||
PKG_VERSION:=1.21-2
|
PKG_VERSION:=1.21-3
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
|
|
@ -1369,7 +1369,7 @@ function gen_config(var)
|
||||||
local _, i = string.find(s, "#")
|
local _, i = string.find(s, "#")
|
||||||
local m = string.len(s) - i + 1
|
local m = string.len(s) - i + 1
|
||||||
local n = w:sub(m + 1)
|
local n = w:sub(m + 1)
|
||||||
sys.call("nft flush set inet fw4 " .. n .. "2>/dev/null")
|
sys.call("nft flush set inet fw4 " .. n .. " 2>/dev/null")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1248,7 +1248,7 @@ function gen_config(var)
|
||||||
local _, i = string.find(s, "#")
|
local _, i = string.find(s, "#")
|
||||||
local m = string.len(s) - i + 1
|
local m = string.len(s) - i + 1
|
||||||
local n = w:sub(m + 1)
|
local n = w:sub(m + 1)
|
||||||
sys.call("nft flush set inet fw4 " .. n .. "2>/dev/null")
|
sys.call("nft flush set inet fw4 " .. n .. " 2>/dev/null")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,13 +11,13 @@ LUCI_DEPENDS:=+curl +opkg +luci-base +tar +coreutils +coreutils-stat +libuci-lua
|
||||||
LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.17)
|
LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.17)
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
|
|
||||||
PKG_VERSION:=0.1.14-1
|
PKG_VERSION:=0.1.14-2
|
||||||
# PKG_RELEASE MUST be empty for luci.mk
|
# PKG_RELEASE MUST be empty for luci.mk
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
ISTORE_UI_VERSION:=0.1.14
|
ISTORE_UI_VERSION:=0.1.14
|
||||||
ISTORE_UI_RELEASE:=1
|
ISTORE_UI_RELEASE:=2
|
||||||
PKG_HASH:=4ec3c8ecbba6f1cc205bbba1ee9c8b804ded8fe743150a7c32fc966fc254b50c
|
PKG_HASH:=4d20ffeabfe6572b01e0bedd860043ec0dbd6f2f63aaf0ee58caeb851df18e73
|
||||||
|
|
||||||
PKG_SOURCE_URL_FILE:=v$(ISTORE_UI_VERSION)-$(ISTORE_UI_RELEASE).tar.gz
|
PKG_SOURCE_URL_FILE:=v$(ISTORE_UI_VERSION)-$(ISTORE_UI_RELEASE).tar.gz
|
||||||
PKG_SOURCE:=istore-ui-$(PKG_SOURCE_URL_FILE)
|
PKG_SOURCE:=istore-ui-$(PKG_SOURCE_URL_FILE)
|
||||||
|
|
|
@ -227,7 +227,7 @@ function store_action(param)
|
||||||
local metadata = fs.readfile(metadir .. "/" .. pkg .. ".json")
|
local metadata = fs.readfile(metadir .. "/" .. pkg .. ".json")
|
||||||
|
|
||||||
if metadata ~= nil then
|
if metadata ~= nil then
|
||||||
meta = json_parse(metadata)
|
meta = json_parse(metadata) or {}
|
||||||
end
|
end
|
||||||
meta.installed = false
|
meta.installed = false
|
||||||
local status = ipkg.status(metapkg)
|
local status = ipkg.status(metapkg)
|
||||||
|
@ -247,6 +247,20 @@ function store_action(param)
|
||||||
local metadata = fs.readfile(metadir .. "/" .. pkg)
|
local metadata = fs.readfile(metadir .. "/" .. pkg)
|
||||||
if metadata ~= nil then
|
if metadata ~= nil then
|
||||||
local meta = json_parse(metadata)
|
local meta = json_parse(metadata)
|
||||||
|
if meta == nil then
|
||||||
|
local i18n = require("luci.i18n")
|
||||||
|
local name = pkg:gsub("^(.-)%.json$", "%1")
|
||||||
|
meta = {
|
||||||
|
name = name,
|
||||||
|
title = "{ " .. name .. " }",
|
||||||
|
author = "<UNKNOWN>",
|
||||||
|
version = "0.0.0",
|
||||||
|
description = i18n.translate("This package is broken! Please reinstall or uninstall it."),
|
||||||
|
depends = {},
|
||||||
|
tags = {"broken"},
|
||||||
|
broken = true,
|
||||||
|
}
|
||||||
|
end
|
||||||
local metapkg = metapkgpre .. meta.name
|
local metapkg = metapkgpre .. meta.name
|
||||||
local status = ipkg.status(metapkg)
|
local status = ipkg.status(metapkg)
|
||||||
if next(status) ~= nil then
|
if next(status) ~= nil then
|
||||||
|
@ -267,6 +281,11 @@ function store_action(param)
|
||||||
else
|
else
|
||||||
local meta = json_parse(fs.readfile(metadir .. "/" .. pkg .. ".json"))
|
local meta = json_parse(fs.readfile(metadir .. "/" .. pkg .. ".json"))
|
||||||
local pkgs = {}
|
local pkgs = {}
|
||||||
|
if meta == nil then
|
||||||
|
meta = {
|
||||||
|
depends = {},
|
||||||
|
}
|
||||||
|
end
|
||||||
if action == "upgrade" then
|
if action == "upgrade" then
|
||||||
pkgs = meta.depends
|
pkgs = meta.depends
|
||||||
table.insert(pkgs, metapkg)
|
table.insert(pkgs, metapkg)
|
||||||
|
|
|
@ -6,3 +6,6 @@ msgstr "en"
|
||||||
|
|
||||||
msgid "iStore"
|
msgid "iStore"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "This package is broken! Please reinstall or uninstall it."
|
||||||
|
msgstr ""
|
||||||
|
|
|
@ -6,3 +6,6 @@ msgstr "zh-cn"
|
||||||
|
|
||||||
msgid "iStore"
|
msgid "iStore"
|
||||||
msgstr "iStore"
|
msgstr "iStore"
|
||||||
|
|
||||||
|
msgid "This package is broken! Please reinstall or uninstall it."
|
||||||
|
msgstr "此软件包已损坏!请重新安装或卸载它。"
|
||||||
|
|
|
@ -6,3 +6,6 @@ msgstr "zh-cn"
|
||||||
|
|
||||||
msgid "iStore"
|
msgid "iStore"
|
||||||
msgstr "iStore"
|
msgstr "iStore"
|
||||||
|
|
||||||
|
msgid "This package is broken! Please reinstall or uninstall it."
|
||||||
|
msgstr "此軟體包已損壞!請重新安裝或卸載它。"
|
||||||
|
|
Loading…
Reference in New Issue