mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 01:55:13 +08:00
💋 Sync 2026-10-07 13:35:16
This commit is contained in:
1 parent
8d499d46b7
commit
5478ca91f2
11 files changed
+40
-73
No files matched your search
@@ -1,8 +1,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-open-box
|
||||
PKG_VERSION:=0.1.291
|
||||
PKG_RELEASE:=14
|
||||
PKG_VERSION:=0.1.292
|
||||
PKG_RELEASE:=15
|
||||
|
||||
PKG_MAINTAINER:=liandu2024
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.10.4
|
||||
PKG_RELEASE:=318
|
||||
PKG_RELEASE:=319
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -462,14 +462,14 @@ if singbox_tags:find("with_quic") then
|
||||
o = s:option(Value, "hysteria2_down_mbps", translate("Max download Mbps"))
|
||||
o:depends({ protocol = "hysteria2" })
|
||||
|
||||
o = s:option(Value, "hysteria2_stream_recv_win", translate("QUIC stream receive window"))
|
||||
o.datatype = "uinteger"
|
||||
o.placeholder = "8388608"
|
||||
o = s:option(Value, "hysteria2_stream_recv_win", translate("QUIC stream receive window") .. " (MB)")
|
||||
o.datatype = "range(1,1000)"
|
||||
o.placeholder = "8"
|
||||
o:depends({ protocol = "hysteria2" })
|
||||
|
||||
o = s:option(Value, "hysteria2_conn_recv_win", translate("QUIC connection receive window"))
|
||||
o.datatype = "uinteger"
|
||||
o.placeholder = "20971520"
|
||||
o = s:option(Value, "hysteria2_conn_recv_win", translate("QUIC connection receive window") .. " (MB)")
|
||||
o.datatype = "range(1,1000)"
|
||||
o.placeholder = "20"
|
||||
o:depends({ protocol = "hysteria2" })
|
||||
|
||||
o = s:option(Value, "hysteria2_idle_timeout", translate("Idle Timeout"), translate("Units:seconds") .. " (4~120)")
|
||||
|
||||
@@ -393,14 +393,14 @@ o:depends({ protocol = "hysteria2" })
|
||||
o = s:option(Value, "hysteria2_down_mbps", translate("Max download Mbps"))
|
||||
o:depends({ protocol = "hysteria2" })
|
||||
|
||||
o = s:option(Value, "hysteria2_stream_recv_win", translate("QUIC stream receive window"))
|
||||
o.datatype = "uinteger"
|
||||
o.placeholder = "8388608"
|
||||
o = s:option(Value, "hysteria2_stream_recv_win", translate("QUIC stream receive window") .. " (MB)")
|
||||
o.datatype = "range(1,1000)"
|
||||
o.placeholder = "8"
|
||||
o:depends({ protocol = "hysteria2" })
|
||||
|
||||
o = s:option(Value, "hysteria2_conn_recv_win", translate("QUIC connection receive window"))
|
||||
o.datatype = "uinteger"
|
||||
o.placeholder = "20971520"
|
||||
o = s:option(Value, "hysteria2_conn_recv_win", translate("QUIC connection receive window") .. " (MB)")
|
||||
o.datatype = "range(1,1000)"
|
||||
o.placeholder = "20"
|
||||
o:depends({ protocol = "hysteria2" })
|
||||
|
||||
o = s:option(Value, "hysteria2_idle_timeout", translate("Idle Timeout"), translate("Units:seconds") .. " (4~120)")
|
||||
|
||||
@@ -109,14 +109,14 @@ o.rewrite_option = o.option
|
||||
o = s:option(Value, "down_mbps", translate("Max download Mbps"))
|
||||
o.rewrite_option = o.option
|
||||
|
||||
o = s:option(Value, "stream_recv_win", translate("QUIC stream receive window"))
|
||||
o.datatype = "uinteger"
|
||||
o.placeholder = "8388608"
|
||||
o = s:option(Value, "stream_recv_win", translate("QUIC stream receive window") .. " (MB)")
|
||||
o.datatype = "range(1,1000)"
|
||||
o.placeholder = "8"
|
||||
o.rewrite_option = o.option
|
||||
|
||||
o = s:option(Value, "conn_recv_win", translate("QUIC connection receive window"))
|
||||
o.datatype = "uinteger"
|
||||
o.placeholder = "20971520"
|
||||
o = s:option(Value, "conn_recv_win", translate("QUIC connection receive window") .. " (MB)")
|
||||
o.datatype = "range(1,1000)"
|
||||
o.placeholder = "20"
|
||||
o.rewrite_option = o.option
|
||||
|
||||
o = s:option(Value, "idle_timeout", translate("Idle Timeout"), translate("Units:seconds") .. " (4~120)")
|
||||
|
||||
@@ -261,16 +261,6 @@ function get_domain_port_from_url(url)
|
||||
return domain, port
|
||||
end
|
||||
|
||||
--解析域名
|
||||
function domainToIPv4(domain, dns)
|
||||
local Dns = dns or "223.5.5.5"
|
||||
local IPs = luci.sys.exec('nslookup %s %s | awk \'/^Name:/{getline; if ($1 == "Address:") print $2}\'' % { domain, Dns })
|
||||
for IP in string.gmatch(IPs, "%S+") do
|
||||
if datatypes.ipaddr(IP) and not datatypes.ip6addr(IP) then return IP end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function curl_base(url, file, args)
|
||||
if not args then args = {} end
|
||||
if file then
|
||||
@@ -300,35 +290,6 @@ function curl_logic(url, file, args)
|
||||
return return_code, result
|
||||
end
|
||||
|
||||
function curl_direct(url, file, args)
|
||||
--直连访问
|
||||
local chn_list = uci_get_c("@global[0]", "chn_list") or "direct"
|
||||
local Dns = (chn_list == "proxy") and "1.1.1.1" or "223.5.5.5"
|
||||
if not args then args = {} end
|
||||
local tmp_args = clone(args)
|
||||
local domain, port = get_domain_port_from_url(url)
|
||||
if domain then
|
||||
local ip = domainToIPv4(domain, Dns)
|
||||
if ip then
|
||||
tmp_args[#tmp_args + 1] = "--resolve " .. domain .. ":" .. port .. ":" .. ip
|
||||
end
|
||||
end
|
||||
return curl_base(url, file, tmp_args)
|
||||
end
|
||||
|
||||
function curl_auto(url, file, args)
|
||||
local localhost_proxy = uci_get_c("@global[0]", "localhost_proxy") or "1"
|
||||
if localhost_proxy == "1" then
|
||||
return curl_base(url, file, args) -- 当路由器本机开启代理时,采用passwall规则进行访问
|
||||
else
|
||||
local return_code, result = curl_proxy(url, file, args)
|
||||
if not return_code or return_code ~= 0 then
|
||||
return_code, result = curl_direct(url, file, args)
|
||||
end
|
||||
return return_code, result
|
||||
end
|
||||
end
|
||||
|
||||
function url(...)
|
||||
local url = string.format("admin/services/%s", appname)
|
||||
local args = { ... }
|
||||
|
||||
@@ -144,8 +144,8 @@ function gen_config(var)
|
||||
ech = (node.ech == "1") and node.ech_config or nil
|
||||
},
|
||||
quic = {
|
||||
initStreamReceiveWindow = node.hysteria2_stream_recv_win and tonumber(node.hysteria2_stream_recv_win) or nil,
|
||||
initConnReceiveWindow = node.hysteria2_conn_recv_win and tonumber(node.hysteria2_conn_recv_win) or nil,
|
||||
initStreamReceiveWindow = tonumber(node.hysteria2_stream_recv_win) and tonumber(node.hysteria2_stream_recv_win)*1048576 or nil,
|
||||
initConnReceiveWindow = tonumber(node.hysteria2_conn_recv_win) and tonumber(node.hysteria2_conn_recv_win)*1048576 or nil,
|
||||
maxIdleTimeout = (function(t)
|
||||
t = tonumber(tostring(t or "30"):match("^%d+"))
|
||||
return (t and t >= 4 and t <= 120) and t .. "s" or "30s"
|
||||
|
||||
@@ -630,8 +630,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
t = tonumber(tostring(t or "0"):match("^%d+"))
|
||||
return (t and t >= 2 and t <= 60) and t .. "s" or nil
|
||||
end)(node.hysteria2_keep_alive_period),
|
||||
stream_receive_window = tonumber(node.hysteria2_stream_recv_win) and tonumber(node.hysteria2_stream_recv_win)/1048576 .. " MB" or nil,
|
||||
connection_receive_window = tonumber(node.hysteria2_conn_recv_win) and tonumber(node.hysteria2_conn_recv_win)/1048576 .. " MB" or nil,
|
||||
stream_receive_window = tonumber(node.hysteria2_stream_recv_win) and tonumber(node.hysteria2_stream_recv_win) .. " MB" or nil,
|
||||
connection_receive_window = tonumber(node.hysteria2_conn_recv_win) and tonumber(node.hysteria2_conn_recv_win) .. " MB" or nil,
|
||||
disable_path_mtu_discovery = version_ge_1_14_0 and (node.hysteria2_disable_mtu_discovery == "1") or nil,
|
||||
tls = tls,
|
||||
realm = node.hysteria2_realms and (function()
|
||||
|
||||
@@ -389,8 +389,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
return (t and t >= 2 and t <= 60) and t or nil
|
||||
end)(node.hysteria2_keep_alive_period),
|
||||
disablePathMTUDiscovery = node.hysteria2_disable_mtu_discovery == "1",
|
||||
initStreamReceiveWindow = node.hysteria2_stream_recv_win and tonumber(node.hysteria2_stream_recv_win) or nil,
|
||||
initConnectionReceiveWindow = node.hysteria2_conn_recv_win and tonumber(node.hysteria2_conn_recv_win) or nil,
|
||||
initStreamReceiveWindow = tonumber(node.hysteria2_stream_recv_win) and tonumber(node.hysteria2_stream_recv_win)*1048576 or nil,
|
||||
initConnectionReceiveWindow = tonumber(node.hysteria2_conn_recv_win) and tonumber(node.hysteria2_conn_recv_win)*1048576 or nil,
|
||||
}
|
||||
end
|
||||
if fragment and fragment_table and ({raw=1, ws=1, httpupgrade=1, grpc=1, xhttp=1})[TP] then
|
||||
|
||||
@@ -111,7 +111,7 @@ local function curl(url, file)
|
||||
if file then
|
||||
args[#args + 1] = "-o " .. file
|
||||
end
|
||||
local return_code, result = api.curl_auto(url, nil, args)
|
||||
local return_code, result = api.curl_logic(url, nil, args)
|
||||
if result and result ~= "" then
|
||||
local body, code = result:match("^(.-)%s*([0-9]+)$")
|
||||
if code then
|
||||
|
||||
@@ -596,14 +596,20 @@ function getDisplayEncryption(radioNet) {
|
||||
}
|
||||
|
||||
function getDisplayBSSID(radioNet) {
|
||||
const bssid = uci.get('wireless', radioNet.getName(), 'macaddr') ||
|
||||
uci.get('wireless', radioNet.getWifiDeviceName(), 'macaddr') ||
|
||||
radioNet.getBSSID() || radioNet.getActiveBSSID();
|
||||
// A radio MAC may differ from the BSSID of an individual virtual AP.
|
||||
const candidates = [
|
||||
radioNet.getActiveBSSID(),
|
||||
radioNet.getBSSID(),
|
||||
uci.get('wireless', radioNet.getName(), 'macaddr')
|
||||
];
|
||||
|
||||
if (bssid && bssid != '00:00:00:00:00:00')
|
||||
return String(bssid).toUpperCase();
|
||||
for (const bssid of candidates)
|
||||
if (typeof bssid == 'string' &&
|
||||
/^(?:[0-9a-f]{2}:){5}[0-9a-f]{2}$/i.test(bssid) &&
|
||||
bssid != '00:00:00:00:00:00')
|
||||
return bssid.toUpperCase();
|
||||
|
||||
return bssid || null;
|
||||
return null;
|
||||
}
|
||||
|
||||
function getFtIdentifier(radioNet) {
|
||||
|
||||
Reference in new issue
Block a user