mirror of
https://github.com/bolucat/Archive.git
synced 2025-09-26 20:21:35 +08:00
Update On Thu Sep 4 20:39:34 CEST 2025
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=25.8.25
|
||||
PKG_VERSION:=25.9.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
@@ -176,9 +176,10 @@ o.cfgvalue = function(t, n)
|
||||
type = type .. " " .. protocol
|
||||
end
|
||||
local address = m:get(n, "address") or ""
|
||||
local port = m:get(n, "port") or ""
|
||||
local port = m:get(n, "port") or m:get(n, "hysteria_hop") or m:get(n, "hysteria2_hop") or ""
|
||||
str = str .. translate(type) .. ":" .. remarks
|
||||
if address ~= "" and port ~= "" then
|
||||
port = port:gsub(":", "-")
|
||||
if show_node_info == "1" then
|
||||
if datatypes.ip6addr(address) then
|
||||
str = str .. string.format("([%s]:%s)", address, port)
|
||||
|
@@ -173,6 +173,10 @@ if has_xray then
|
||||
o.default = "10-20"
|
||||
o:depends("fragment", true)
|
||||
|
||||
o = s_xray:option(Value, "fragment_maxSplit", translate("Max Split"), translate("Limit the maximum number of splits."))
|
||||
o.default = "100-200"
|
||||
o:depends("fragment", true)
|
||||
|
||||
o = s_xray:option(Flag, "noise", translate("Noise"), translate("UDP noise, Under some circumstances it can bypass some UDP based protocol restrictions."))
|
||||
o.default = 0
|
||||
|
||||
@@ -231,6 +235,10 @@ if has_xray then
|
||||
o.datatype = "or(uinteger,portrange)"
|
||||
o.rmempty = false
|
||||
|
||||
o = s_xray_noise:option(ListValue, "applyTo", translate("IP Type"))
|
||||
o:value("ip", "ALL")
|
||||
o:value("ipv4", "IPv4")
|
||||
o:value("ipv6", "IPv6")
|
||||
end
|
||||
|
||||
if has_singbox then
|
||||
|
@@ -309,7 +309,7 @@ o = s:option(ListValue, _n("security"), translate("Encrypt Method"))
|
||||
for a, t in ipairs(security_list) do o:value(t) end
|
||||
o:depends({ [_n("protocol")] = "vmess" })
|
||||
|
||||
o = s:option(Value, _n("encryption"), translate("Encrypt Method"))
|
||||
o = s:option(Value, _n("encryption"), translate("Encrypt Method") .. " (encryption)")
|
||||
o.default = "none"
|
||||
o:value("none")
|
||||
o:depends({ [_n("protocol")] = "vless" })
|
||||
@@ -338,7 +338,7 @@ o.default = ""
|
||||
o:value("", translate("Disable"))
|
||||
o:value("xtls-rprx-vision")
|
||||
o:depends({ [_n("protocol")] = "vless", [_n("tls")] = true, [_n("transport")] = "raw" })
|
||||
o:depends({ [_n("protocol")] = "trojan", [_n("tls")] = true, [_n("transport")] = "raw" })
|
||||
o:depends({ [_n("protocol")] = "vless", [_n("tls")] = true, [_n("transport")] = "xhttp" })
|
||||
|
||||
o = s:option(Flag, _n("tls"), translate("TLS"))
|
||||
o.default = 0
|
||||
|
@@ -343,7 +343,6 @@ o.default = ""
|
||||
o:value("", translate("Disable"))
|
||||
o:value("xtls-rprx-vision")
|
||||
o:depends({ [_n("protocol")] = "vless", [_n("tls")] = true })
|
||||
o:depends({ [_n("protocol")] = "trojan", [_n("tls")] = true })
|
||||
|
||||
if singbox_tags:find("with_quic") then
|
||||
o = s:option(Value, _n("hysteria_hop"), translate("Port hopping range"))
|
||||
|
@@ -80,8 +80,9 @@ o = s:option(Value, _n("d_port"), translate("Destination port"))
|
||||
o.datatype = "port"
|
||||
o:depends({ [_n("protocol")] = "dokodemo-door" })
|
||||
|
||||
o = s:option(Value, _n("decryption"), translate("Encrypt Method"))
|
||||
o = s:option(Value, _n("decryption"), translate("Encrypt Method") .. " (decryption)")
|
||||
o.default = "none"
|
||||
o.placeholder = "none"
|
||||
o:depends({ [_n("protocol")] = "vless" })
|
||||
|
||||
o = s:option(ListValue, _n("x_ss_method"), translate("Encrypt Method"))
|
||||
@@ -117,6 +118,7 @@ o.default = ""
|
||||
o:value("", translate("Disable"))
|
||||
o:value("xtls-rprx-vision")
|
||||
o:depends({ [_n("protocol")] = "vless", [_n("tls")] = true, [_n("transport")] = "raw" })
|
||||
o:depends({ [_n("protocol")] = "vless", [_n("tls")] = true, [_n("transport")] = "xhttp" })
|
||||
|
||||
o = s:option(Flag, _n("tls"), translate("TLS"))
|
||||
o.default = 0
|
||||
@@ -369,7 +371,7 @@ o:value("aes-128-gcm")
|
||||
o:value("chacha20-poly1305")
|
||||
o:depends({ [_n("transport")] = "quic" })
|
||||
|
||||
o = s:option(Value, _n("quic_key"), translate("Encrypt Method") .. translate("Key"))
|
||||
o = s:option(Value, _n("quic_key"), translate("Encrypt Key"))
|
||||
o:depends({ [_n("transport")] = "quic" })
|
||||
|
||||
o = s:option(ListValue, _n("quic_guise"), translate("Camouflage Type"))
|
||||
|
@@ -213,7 +213,7 @@ o = s:option(ListValue, _n("flow"), translate("flow"))
|
||||
o.default = ""
|
||||
o:value("", translate("Disable"))
|
||||
o:value("xtls-rprx-vision")
|
||||
o:depends({ [_n("protocol")] = "vless" })
|
||||
o:depends({ [_n("protocol")] = "vless" , [_n("tls")] = true })
|
||||
|
||||
o = s:option(Flag, _n("tls"), translate("TLS"))
|
||||
o.default = 0
|
||||
|
@@ -463,7 +463,8 @@ function get_valid_nodes()
|
||||
e["node_type"] = "special"
|
||||
nodes[#nodes + 1] = e
|
||||
end
|
||||
if e.port and e.address then
|
||||
local port = e.port or e.hysteria_hop or e.hysteria2_hop
|
||||
if port and e.address then
|
||||
local address = e.address
|
||||
if is_ip(address) or datatypes.hostname(address) then
|
||||
local type = e.type
|
||||
@@ -496,7 +497,8 @@ function get_valid_nodes()
|
||||
if is_ipv6(address) then address = get_ipv6_full(address) end
|
||||
e["remark"] = "%s:[%s]" % {type, e.remarks}
|
||||
if show_node_info == "1" then
|
||||
e["remark"] = "%s:[%s] %s:%s" % {type, e.remarks, address, e.port}
|
||||
port = port:gsub(":", "-")
|
||||
e["remark"] = "%s:[%s] %s:%s" % {type, e.remarks, address, port}
|
||||
end
|
||||
e.node_type = "normal"
|
||||
nodes[#nodes + 1] = e
|
||||
@@ -549,8 +551,10 @@ end
|
||||
function get_full_node_remarks(n)
|
||||
local remarks = get_node_remarks(n)
|
||||
if #remarks > 0 then
|
||||
if n.address and n.port then
|
||||
remarks = remarks .. " " .. n.address .. ":" .. n.port
|
||||
local port = n.port or n.hysteria_hop or n.hysteria2_hop
|
||||
if n.address and port then
|
||||
port = port:gsub(":", "-")
|
||||
remarks = remarks .. " " .. n.address .. ":" .. port
|
||||
end
|
||||
end
|
||||
return remarks
|
||||
|
@@ -937,10 +937,10 @@ function gen_config(var)
|
||||
type = _type,
|
||||
tag = rule_set_tag,
|
||||
format = format,
|
||||
path = format == "source" and w or nil,
|
||||
url = format == "binary" and w or nil,
|
||||
--download_detour = format == "binary" and "",
|
||||
--update_interval = format == "binary" and "",
|
||||
path = _type == "local" and w or nil,
|
||||
url = _type == "remote" and w or nil,
|
||||
--download_detour = _type == "remote" and "",
|
||||
--update_interval = _type == "remote" and "",
|
||||
}
|
||||
rule_set_table[rule_set_tag] = t
|
||||
result = t
|
||||
|
@@ -24,7 +24,8 @@ local function get_noise_packets()
|
||||
local noise = (n.enabled == "1") and {
|
||||
type = n.type,
|
||||
packet = n.packet,
|
||||
delay = string.find(n.delay, "-") and n.delay or tonumber(n.delay)
|
||||
delay = string.find(n.delay, "-") and n.delay or tonumber(n.delay),
|
||||
applyTo = n.applyTo
|
||||
} or nil
|
||||
table.insert(noises, noise)
|
||||
end)
|
||||
@@ -243,7 +244,7 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
level = 0,
|
||||
security = (node.protocol == "vmess") and node.security or nil,
|
||||
encryption = node.encryption or "none",
|
||||
flow = (node.protocol == "vless" and node.tls == "1" and (node.transport == "raw" or node.transport == "tcp") and node.flow and node.flow ~= "") and node.flow or nil
|
||||
flow = (node.protocol == "vless" and node.tls == "1" and (node.transport == "raw" or node.transport == "tcp" or node.transport == "xhttp") and node.flow and node.flow ~= "") and node.flow or nil
|
||||
|
||||
}
|
||||
}
|
||||
@@ -315,7 +316,7 @@ function gen_config_server(node)
|
||||
for i = 1, #node.uuid do
|
||||
clients[i] = {
|
||||
id = node.uuid[i],
|
||||
flow = ("vless" == node.protocol and "1" == node.tls and "raw" == node.transport and node.flow and node.flow ~= "") and node.flow or nil
|
||||
flow = (node.protocol == "vless" and node.tls == "1" and (node.transport == "raw" or node.transport == "xhttp") and node.flow and node.flow ~= "") and node.flow or nil
|
||||
}
|
||||
end
|
||||
settings = {
|
||||
@@ -1566,7 +1567,8 @@ function gen_config(var)
|
||||
fragment = (xray_settings.fragment == "1") and {
|
||||
packets = (xray_settings.fragment_packets and xray_settings.fragment_packets ~= "") and xray_settings.fragment_packets,
|
||||
length = (xray_settings.fragment_length and xray_settings.fragment_length ~= "") and xray_settings.fragment_length,
|
||||
interval = (xray_settings.fragment_interval and xray_settings.fragment_interval ~= "") and xray_settings.fragment_interval
|
||||
interval = (xray_settings.fragment_interval and xray_settings.fragment_interval ~= "") and xray_settings.fragment_interval,
|
||||
maxSplit = (xray_settings.fragment_maxSplit and xray_settings.fragment_maxSplit ~= "") and xray_settings.fragment_maxSplit
|
||||
} or nil,
|
||||
noises = (xray_settings.noise == "1") and get_noise_packets() or nil
|
||||
},
|
||||
|
@@ -2,17 +2,34 @@
|
||||
<%
|
||||
local api = require "luci.passwall2.api"
|
||||
local map = self.map
|
||||
local ss_type = map:get("@global_subscribe[0]", "ss_type") or "shadowsocks-libev"
|
||||
local trojan_type = map:get("@global_subscribe[0]", "trojan_type") or "xray"
|
||||
local vmess_type = map:get("@global_subscribe[0]", "vmess_type") or "xray"
|
||||
local vless_type = map:get("@global_subscribe[0]", "vless_type") or "xray"
|
||||
local hysteria2_type = map:get("@global_subscribe[0]", "hysteria2_type") or "sing-box"
|
||||
|
||||
local has_ss = api.is_finded("ss-redir")
|
||||
local has_ss_rust = api.is_finded("sslocal")
|
||||
local has_singbox = api.finded_com("sing-box")
|
||||
local has_xray = api.finded_com("xray")
|
||||
local has_hysteria2 = api.finded_com("hysteria")
|
||||
|
||||
local function get_core(field, candidates)
|
||||
local v = map:get("@global_subscribe[0]", field)
|
||||
if not v or v == "" then
|
||||
for _, c in ipairs(candidates) do
|
||||
if c[1] then return c[2] end
|
||||
end
|
||||
end
|
||||
return v
|
||||
end
|
||||
|
||||
local ss_type = get_core("ss_type", {{has_ss,"shadowsocks-libev"},{has_ss_rust,"shadowsocks-rust"},{has_singbox,"sing-box"},{has_xray,"xray"}})
|
||||
local trojan_type = get_core("trojan_type", {{has_singbox,"sing-box"},{has_xray,"xray"}})
|
||||
local vmess_type = get_core("vmess_type", {{has_xray,"xray"},{has_singbox,"sing-box"}})
|
||||
local vless_type = get_core("vless_type", {{has_xray,"xray"},{has_singbox,"sing-box"}})
|
||||
local hysteria2_type = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{has_singbox,"sing-box"}})
|
||||
-%>
|
||||
<script src="<%=resource%>/qrcode.min.js"></script>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
let has_singbox = "<%=api.finded_com("sing-box")%>"
|
||||
let has_xray = "<%=api.finded_com("xray")%>"
|
||||
let has_hysteria2 = "<%=api.finded_com("hysteria")%>"
|
||||
let has_singbox = "<%=has_singbox%>"
|
||||
let has_xray = "<%=has_xray%>"
|
||||
let has_hysteria2 = "<%=has_hysteria2%>"
|
||||
let ss_type = "<%=ss_type%>"
|
||||
let trojan_type = "<%=trojan_type%>"
|
||||
let vmess_type = "<%=vmess_type%>"
|
||||
|
@@ -536,7 +536,10 @@ msgid "Lazy Start"
|
||||
msgstr "延迟启动"
|
||||
|
||||
msgid "Encrypt Method"
|
||||
msgstr "加密"
|
||||
msgstr "加密方式"
|
||||
|
||||
msgid "Encrypt Key"
|
||||
msgstr "加密密钥"
|
||||
|
||||
msgid "Latency"
|
||||
msgstr "延迟"
|
||||
@@ -1609,6 +1612,12 @@ msgstr "分片间隔"
|
||||
msgid "Fragmentation interval (ms)"
|
||||
msgstr "分片间隔(ms)"
|
||||
|
||||
msgid "Max Split"
|
||||
msgstr "最大分片数"
|
||||
|
||||
msgid "Limit the maximum number of splits."
|
||||
msgstr "限制分片的最大数量。"
|
||||
|
||||
msgid "Split handshake data into multiple TLS records for better censorship evasion. Low overhead. Recommended to enable first."
|
||||
msgstr "将握手数据拆分为多个 TLS 记录,提升抗封锁能力,几乎不增加延迟,建议优先启用。"
|
||||
|
||||
@@ -1633,6 +1642,9 @@ msgstr "数据包"
|
||||
msgid "Delay (ms)"
|
||||
msgstr "延迟(ms)"
|
||||
|
||||
msgid "IP Type"
|
||||
msgstr "IP 类型"
|
||||
|
||||
msgid "If is domain name, The requested domain name will be resolved to IP before connect."
|
||||
msgstr "如果是域名,域名将在请求发出之前解析为 IP。"
|
||||
|
||||
|
@@ -40,7 +40,7 @@ end
|
||||
-- curl
|
||||
local function curl(url, file)
|
||||
local args = {
|
||||
"-skL", "-w %{http_code}", "--retry 3", "--connect-timeout 3"
|
||||
"-skL", "-w %{http_code}", "--retry 3", "--connect-timeout 3", "--max-time 300", "--speed-limit 51200 --speed-time 15"
|
||||
}
|
||||
if file then
|
||||
args[#args + 1] = "-o " .. file
|
||||
|
@@ -28,11 +28,22 @@ local has_singbox = api.finded_com("sing-box")
|
||||
local has_xray = api.finded_com("xray")
|
||||
local has_hysteria2 = api.finded_com("hysteria")
|
||||
local allowInsecure_default = true
|
||||
local ss_type_default = uci:get(appname, "@global_subscribe[0]", "ss_type") or "shadowsocks-libev"
|
||||
local trojan_type_default = uci:get(appname, "@global_subscribe[0]", "trojan_type") or "sing-box"
|
||||
local vmess_type_default = uci:get(appname, "@global_subscribe[0]", "vmess_type") or "xray"
|
||||
local vless_type_default = uci:get(appname, "@global_subscribe[0]", "vless_type") or "xray"
|
||||
local hysteria2_type_default = uci:get(appname, "@global_subscribe[0]", "hysteria2_type") or "hysteria2"
|
||||
-- 取节点使用core类型(节点订阅页面未设置时,自动取默认)
|
||||
local function get_core(field, candidates)
|
||||
local v = uci:get(appname, "@global_subscribe[0]", field)
|
||||
if not v or v == "" then
|
||||
for _, c in ipairs(candidates) do
|
||||
if c[1] then return c[2] end
|
||||
end
|
||||
end
|
||||
return v
|
||||
end
|
||||
local ss_type_default = get_core("ss_type", {{has_ss,"shadowsocks-libev"},{has_ss_rust,"shadowsocks-rust"},{has_singbox,"sing-box"},{has_xray,"xray"}})
|
||||
local trojan_type_default = get_core("trojan_type", {{has_singbox,"sing-box"},{has_xray,"xray"}})
|
||||
local vmess_type_default = get_core("vmess_type", {{has_xray,"xray"},{has_singbox,"sing-box"}})
|
||||
local vless_type_default = get_core("vless_type", {{has_xray,"xray"},{has_singbox,"sing-box"}})
|
||||
local hysteria2_type_default = get_core("hysteria2_type", {{has_hysteria2,"hysteria2"},{has_singbox,"sing-box"}})
|
||||
----
|
||||
local domain_strategy_default = uci:get(appname, "@global_subscribe[0]", "domain_strategy") or ""
|
||||
local domain_strategy_node = ""
|
||||
local preproxy_node_group, to_node_group, chain_node_type = "", "", ""
|
||||
|
Reference in New Issue
Block a user