From d04eaa59bd523b95bc5b77278f38d6bc3ff39605 Mon Sep 17 00:00:00 2001 From: actions Date: Thu, 1 Feb 2024 04:00:10 +0800 Subject: [PATCH] luci-app-passwall2: sync upstream --- luci-app-passwall2/Makefile | 2 +- .../root/usr/share/passwall2/subscribe.lua | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index 314b74a3e..7a92eef38 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.25-3 +PKG_VERSION:=1.25-4 PKG_RELEASE:= PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua b/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua index a8a052f0b..37fe14b1c 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua +++ b/luci-app-passwall2/root/usr/share/passwall2/subscribe.lua @@ -392,7 +392,12 @@ local function processData(szType, content, add_mode, add_from) result.remarks = info.ps -- result.mux = 1 -- result.mux_concurrency = 8 + + if not info.net then + info.net = "tcp" + end info.net = string.lower(info.net) + result.transport = info.net if info.net == 'ws' then result.ws_host = info.host result.ws_path = info.path @@ -427,7 +432,6 @@ local function processData(szType, content, add_mode, add_from) if info.net == 'grpc' then result.grpc_serviceName = info.path end - result.transport = info.net if not info.security then result.security = "auto" end if info.tls == "tls" or info.tls == "1" then result.tls = "1" @@ -660,7 +664,11 @@ local function processData(szType, content, add_mode, add_from) result.address = host_port end + if not params.type then + params.type = "tcp" + end params.type = string.lower(params.type) + result.transport = params.type if params.type == 'ws' then result.ws_host = params.host result.ws_path = params.path @@ -695,7 +703,6 @@ local function processData(szType, content, add_mode, add_from) if params.serviceName then result.grpc_serviceName = params.serviceName end result.grpc_mode = params.mode end - result.transport = params.type result.encryption = params.encryption or "none"