luci-app-ssr-plus: fix subscribe bugs about grpc and sni

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Chikage0o0 2022-04-09 22:55:01 +08:00 committed by sbwml
parent 4162426d4e
commit 027f8f68fc

View File

@ -192,6 +192,13 @@ local function processData(szType, content)
result.read_buffer_size = 2 result.read_buffer_size = 2
result.write_buffer_size = 2 result.write_buffer_size = 2
end end
if info.net == 'grpc' then
if info.path then
result.serviceName = info.path
elseif info.serviceName then
result.serviceName = info.serviceName
end
end
if info.net == 'quic' then if info.net == 'quic' then
result.quic_guise = info.type result.quic_guise = info.type
result.quic_key = info.key result.quic_key = info.key
@ -202,7 +209,11 @@ local function processData(szType, content)
end end
if info.tls == "tls" or info.tls == "1" then if info.tls == "tls" or info.tls == "1" then
result.tls = "1" result.tls = "1"
result.tls_host = info.host if info.sni then
result.tls_host = info.sni
elseif info.host then
result.tls_host = info.host
end
result.insecure = 1 result.insecure = 1
else else
result.tls = "0" result.tls = "0"