From 027f8f68fcfa5d6c7842ed2fcb47ff6d4a0ee278 Mon Sep 17 00:00:00 2001 From: Chikage0o0 <89348590+Chikage0o0@users.noreply.github.com> Date: Sat, 9 Apr 2022 22:55:01 +0800 Subject: [PATCH] luci-app-ssr-plus: fix subscribe bugs about grpc and sni Signed-off-by: Tianling Shen --- .../root/usr/share/shadowsocksr/subscribe.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua index ee0177d5f..8e76f246a 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua @@ -192,6 +192,13 @@ local function processData(szType, content) result.read_buffer_size = 2 result.write_buffer_size = 2 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 result.quic_guise = info.type result.quic_key = info.key @@ -202,7 +209,11 @@ local function processData(szType, content) end if info.tls == "tls" or info.tls == "1" then 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 else result.tls = "0"