mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-02 06:23:56 +08:00
update 2026-07-31 14:39:27
This commit is contained in:
1 parent
5bae02c9e0
commit
8049de7024
5 files changed
+15
-9
No files matched your search
@@ -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."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user