diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index 62d0a7b90..b5f2e72dc 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:=1.20-11 +PKG_VERSION:=1.20-12 PKG_RELEASE:= PKG_CONFIG_DEPENDS:= \ 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 f67d7090b..919558e07 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 @@ -433,6 +433,7 @@ if singbox_tags:find("with_quic") then end if singbox_tags:find("with_grpc") then o:value("grpc", "gRPC") +else o:value("grpc", "gRPC-lite") end o:depends({ [option_name("protocol")] = "vmess" }) o:depends({ [option_name("protocol")] = "vless" }) @@ -499,25 +500,23 @@ o = s:option(Value, option_name("ws_earlyDataHeaderName"), translate("Early data o:depends({ [option_name("ws_enableEarlyData")] = true }) -- [[ gRPC部分 ]]-- -if singbox_tags:find("with_grpc") then - o = s:option(Value, option_name("grpc_serviceName"), "ServiceName") - o:depends({ [option_name("transport")] = "grpc" }) +o = s:option(Value, option_name("grpc_serviceName"), "ServiceName") +o:depends({ [option_name("transport")] = "grpc" }) - o = s:option(Flag, option_name("grpc_health_check"), translate("Health check")) - o:depends({ [option_name("transport")] = "grpc" }) +o = s:option(Flag, option_name("grpc_health_check"), translate("Health check")) +o:depends({ [option_name("transport")] = "grpc" }) - o = s:option(Value, option_name("grpc_idle_timeout"), translate("Idle timeout")) - o.default = "10" - o:depends({ [option_name("grpc_health_check")] = true }) +o = s:option(Value, option_name("grpc_idle_timeout"), translate("Idle timeout")) +o.default = "10" +o:depends({ [option_name("grpc_health_check")] = true }) - o = s:option(Value, option_name("grpc_health_check_timeout"), translate("Health check timeout")) - o.default = "20" - o:depends({ [option_name("grpc_health_check")] = true }) +o = s:option(Value, option_name("grpc_health_check_timeout"), translate("Health check timeout")) +o.default = "20" +o:depends({ [option_name("grpc_health_check")] = true }) - o = s:option(Flag, option_name("grpc_permit_without_stream"), translate("Permit without stream")) - o.default = "0" - o:depends({ [option_name("grpc_health_check")] = true }) -end +o = s:option(Flag, option_name("grpc_permit_without_stream"), translate("Permit without stream")) +o.default = "0" +o:depends({ [option_name("grpc_health_check")] = true }) -- [[ Mux ]]-- o = s:option(Flag, option_name("mux"), translate("Mux")) diff --git a/luci-app-passwall2/luasrc/passwall2/util_hysteria2.lua b/luci-app-passwall2/luasrc/passwall2/util_hysteria2.lua index 8ae9b25f8..ef2155b6a 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_hysteria2.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_hysteria2.lua @@ -10,12 +10,12 @@ function gen_config_server(node) cert = node.tls_certificateFile, key = node.tls_keyFile, }, - obfs = { + obfs = (node.hysteria2_obfs) and { type = "salamander", salamander = { password = node.hysteria2_obfs } - }, + } or nil, auth = { type = "password", password = node.hysteria2_auth_password @@ -25,7 +25,7 @@ function gen_config_server(node) down = node.hysteria2_down_mbps and node.hysteria2_down_mbps .. " mbps" or "1 gbps", }, ignoreClientBandwidth = (node.hysteria2_ignoreClientBandwidth == "1") and true or false, - disable_udp = (node.hysteria2_udp == "0") and true or false, + disableUDP = (node.hysteria2_udp == "0") and true or false, } return config end @@ -65,12 +65,12 @@ function gen_config(var) hopInterval = node.hysteria2_hop_interval and node.hysteria2_hop_interval .. "s" or "30s" } }, - obfs = { + obfs = (node.hysteria2_obfs) and { type = "salamander", salamander = { password = node.hysteria2_obfs } - }, + } or nil, auth = node.hysteria2_auth_password, tls = { sni = node.tls_serverName, @@ -92,13 +92,12 @@ function gen_config(var) listen = local_socks_address .. ":" .. local_socks_port, username = (local_socks_username and local_socks_password) and local_socks_username or nil, password = (local_socks_username and local_socks_password) and local_socks_password or nil, - disable_udp = false, + disableUDP = false, } or nil, http = (local_http_address and local_http_port) and { listen = local_http_address .. ":" .. local_http_port, username = (local_http_username and local_http_password) and local_http_username or nil, password = (local_http_username and local_http_password) and local_http_password or nil, - disable_udp = false, } or nil } diff --git a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua index bb775ec39..6431c3fe3 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua @@ -398,7 +398,7 @@ function gen_config_server(node) if node.transport == "grpc" then v2ray_transport = { type = "grpc", - serviceName = node.grpc_serviceName, + service_name = node.grpc_serviceName, } end diff --git a/luci-app-passwall2/luasrc/view/passwall2/global/faq.htm b/luci-app-passwall2/luasrc/view/passwall2/global/faq.htm index 1c96859cd..08ead501f 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/global/faq.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/global/faq.htm @@ -32,10 +32,10 @@ local api = require "luci.passwall2.api"