diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index aeab088bd..24180c5d2 100644 --- a/luci-app-passwall2/Makefile +++ b/luci-app-passwall2/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall2 -PKG_VERSION:=25.4.1 +PKG_VERSION:=25.4.11 PKG_RELEASE:=1 PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/hysteria2.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/hysteria2.lua index 3f1e28363..7b6bd7d1f 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/hysteria2.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/hysteria2.lua @@ -26,7 +26,8 @@ o = s:option(Value, _n("address"), translate("Address (Support Domain Name)")) o = s:option(Value, _n("port"), translate("Port")) o.datatype = "port" -o = s:option(Value, _n("hop"), translate("Additional ports for hysteria hop")) +o = s:option(Value, _n("hop"), translate("Port hopping range")) +o.description = translate("Format as 1000:2000 or 1000-2000 Multiple groups are separated by commas (,).") o.rewrite_option = o.option o = s:option(Value, _n("obfs"), translate("Obfs Password")) diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/ray.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/ray.lua index 64bf75712..3becc9cc7 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/ray.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/ray.lua @@ -31,6 +31,9 @@ local xray_version = api.get_app_version("xray") -- [[ Xray ]] s.fields["type"]:value(type_name, "Xray") +if not s.fields["type"].default then + s.fields["type"].default = type_name +end o = s:option(ListValue, _n("protocol"), translate("Protocol")) o:value("vmess", translate("Vmess")) @@ -631,6 +634,7 @@ o = s:option(Flag, _n("xmux"), "XUDP Mux") o.default = 1 o:depends({ [_n("protocol")] = "vless", [_n("flow")] = "xtls-rprx-vision" }) o:depends({ [_n("protocol")] = "vless", [_n("flow")] = "xtls-rprx-vision-udp443" }) +o:depends({ [_n("protocol")] = "shadowsocks" }) o = s:option(Value, _n("xudp_concurrency"), translate("XUDP Mux concurrency")) o.default = 8 diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/sing-box.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/sing-box.lua index a5da553a6..3859e57ce 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/sing-box.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/sing-box.lua @@ -33,6 +33,9 @@ local security_list = { "none", "auto", "aes-128-gcm", "chacha20-poly1305", "zer -- [[ sing-box ]] s.fields["type"]:value(type_name, translate("Sing-Box")) +if not s.fields["type"].default then + s.fields["type"].default = type_name +end o = s:option(ListValue, _n("protocol"), translate("Protocol")) o:value("socks", "Socks") @@ -401,8 +404,8 @@ if singbox_tags:find("with_quic") then end if singbox_tags:find("with_quic") then - o = s:option(Value, _n("hysteria2_ports"), translate("Port hopping range")) - o.description = translate("Format as 1000:2000 Multiple groups are separated by commas (,).") + o = s:option(Value, _n("hysteria2_hop"), translate("Port hopping range")) + o.description = translate("Format as 1000:2000 or 1000-2000 Multiple groups are separated by commas (,).") o:depends({ [_n("protocol")] = "hysteria2" }) o = s:option(Value, _n("hysteria2_up_mbps"), translate("Max upload Mbps")) diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/ray.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/ray.lua index 9cc5cbdb1..08246bfc5 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/ray.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/ray.lua @@ -25,6 +25,9 @@ local header_type_list = { -- [[ Xray ]] s.fields["type"]:value(type_name, "Xray") +if not s.fields["type"].default then + s.fields["type"].default = type_name +end o = s:option(ListValue, _n("protocol"), translate("Protocol")) o:value("vmess", "Vmess") diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/sing-box.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/sing-box.lua index cafa4b583..dbb4138c1 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/sing-box.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/sing-box.lua @@ -26,6 +26,9 @@ local ss_method_list = { -- [[ Sing-Box ]] s.fields["type"]:value(type_name, "Sing-Box") +if not s.fields["type"].default then + s.fields["type"].default = type_name +end o = s:option(ListValue, _n("protocol"), translate("Protocol")) o:value("mixed", "Mixed") diff --git a/luci-app-passwall2/luasrc/passwall2/util_hysteria2.lua b/luci-app-passwall2/luasrc/passwall2/util_hysteria2.lua index 1d084a862..2065cb01a 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_hysteria2.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_hysteria2.lua @@ -54,7 +54,7 @@ function gen_config(var) local server = server_host .. ":" .. server_port if (node.hysteria2_hop) then - server = server .. "," .. node.hysteria2_hop + server = server .. "," .. string.gsub(node.hysteria2_hop, ":", "-") end local config = { diff --git a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua index 99590a809..06ebb558b 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua @@ -350,8 +350,9 @@ function gen_outbound(flag, node, tag, proxy_table) if node.protocol == "hysteria2" then local server_ports = {} - if node.hysteria2_ports then - for range in node.hysteria2_ports:gmatch("([^,]+)") do + if node.hysteria2_hop then + node.hysteria2_hop = string.gsub(node.hysteria2_hop, "-", ":") + for range in node.hysteria2_hop:gmatch("([^,]+)") do if range:match("^%d+:%d+$") then table.insert(server_ports, range) end diff --git a/luci-app-passwall2/luasrc/view/passwall2/node_list/link_add_node.htm b/luci-app-passwall2/luasrc/view/passwall2/node_list/link_add_node.htm index 6a1bec7e7..1a42aa8ed 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/node_list/link_add_node.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/node_list/link_add_node.htm @@ -2,22 +2,6 @@ local api = require "luci.passwall2.api" -%> - -
<%:Enter share links, one per line. Subscription links are not supported!%>