🔥 Sync 2026-07-31 20:41:05

This commit is contained in:
github-actions[bot] committed 2026-07-31 20:41:05 +08:00
1 parent d1ded93052
commit 3692297595
20 files changed
+253 -86

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall
PKG_VERSION:=26.7.24
PKG_RELEASE:=197
PKG_RELEASE:=198
PKG_PO_VERSION:=$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
@@ -139,6 +139,9 @@ s.extedit = api.url("node_subscribe_config", "%s")
function s.create(e, t)
m.no_commit = true
local id = TypedSection.create(e, t)
uci:set(appname, id, "hysteria_up_mbps", "100")
uci:set(appname, id, "hysteria_down_mbps", "100")
api.uci_save(uci, appname)
luci.http.redirect(e.extedit:format(id))
end
@@ -221,11 +221,9 @@ if #hysteria2_type > 0 then
o = s:option(Value, "hysteria_up_mbps", "Hy/Hy2 " .. translate("Max upload Mbps"))
o.datatype = "uinteger"
o.default = "100"
o = s:option(Value, "hysteria_down_mbps", "Hy/Hy2 " .. translate("Max download Mbps"))
o.datatype = "uinteger"
o.default = "100"
end
o = s:option(Flag, "boot_update", translate("Update Once on Boot"), translate("Updates the subscription the first time PassWall runs automatically after each system boot."))
@@ -7,6 +7,8 @@ local urlencode = api.UrlEncode
local base64 = api.base64Encode
local json = api.jsonc
local domain_redir = {}
local function host_format(host)
if not host then return "" end
local str = host:match("%[(.-)%]") or host
@@ -162,7 +164,7 @@ local function build_common(node)
local d = opts["download-settings"]
local ds = {}
if d.server then ds.address = d.server end
if d.server then ds.address = domain_redir[d.server] or d.server end
if d.port then ds.port = d.port end
ds.network = "xhttp"
@@ -507,6 +509,8 @@ local function encode_node(node)
local t = node.type
node.server = domain_redir[node.server] or node.server
if t == "vless" then return encode_vless(node)
elseif t == "trojan" then return encode_trojan(node)
elseif t == "vmess" then return encode_vmess(node)
@@ -531,6 +535,15 @@ function parseClashNode(raw, remark)
api.log('检测到 Clash 订阅,正在进行转换 ...')
-- Some airports use hosts domain redirect to disguise the real node domain name.
for k, v in pairs(data.hosts or {}) do
if type(k) == "string" and type(v) == "string" then
if api.datatypes.hostname(k) and api.datatypes.hostname(v) then
domain_redir[k] = v
end
end
end
local links = {}
for _, node in ipairs(data.proxies) do
local err, link = encode_node(node)
@@ -330,11 +330,16 @@ end
--中国列表
if CHNLIST ~= "0" and is_file_nonzero(RULES_PATH .. "/chnlist") then
if CHNLIST == "direct" then
local sets = {
setflag .. "psw_chn",
setflag .. "psw_chn6"
}
local suffix = (NFTFLAG == "1") and "_static" or ""
tmp_lines = {
"chnlist-file " .. RULES_PATH .. "/chnlist",
"ipset-name4 " .. setflag .. "psw_chn",
"ipset-name6 " .. setflag .. "psw_chn6",
"add-tagchn-ip",
"ipset-name4 " .. setflag .. "psw_chn" .. suffix,
"ipset-name6 " .. setflag .. "psw_chn6" .. suffix,
"add-tagchn-ip" .. ((NFTFLAG == "1") and (" " .. table.concat(sets, ",")) or ""),
"chnlist-first"
}
merge_array(config_lines, tmp_lines)