From f4a1a049d73b2c00cb62965494b8f2230b29a4d2 Mon Sep 17 00:00:00 2001 From: Toperlock <861705708@qq.com> Date: Mon, 26 Feb 2024 15:52:45 +0800 Subject: [PATCH] fix tls --- parsers/hysteria.py | 3 ++- parsers/hysteria2.py | 3 ++- parsers/tuic.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/parsers/hysteria.py b/parsers/hysteria.py index 26a51f59b..148a4f037 100644 --- a/parsers/hysteria.py +++ b/parsers/hysteria.py @@ -18,7 +18,8 @@ def parse(data): 'auth_str': netquery.get('auth', ''), 'tls': { 'enabled': True, - 'server_name': netquery.get('sni', netquery.get('peer', '')) + 'server_name': netquery.get('sni', netquery.get('peer', '')), + 'insecure': False } } node['tls']['alpn'] = (netquery.get('alpn') or "h3").strip('{}').split(',') diff --git a/parsers/hysteria2.py b/parsers/hysteria2.py index 5aea7a797..44a192a0a 100644 --- a/parsers/hysteria2.py +++ b/parsers/hysteria2.py @@ -20,7 +20,8 @@ def parse(data): 'down_mbps': int(re.search(r'\d+', netquery.get('downmbps', '100')).group()), 'tls': { 'enabled': True, - 'server_name': netquery.get('sni', netquery.get('peer', '')) + 'server_name': netquery.get('sni', netquery.get('peer', '')), + 'insecure': False } } if netquery.get('insecure') in ['1', 'true'] or netquery.get('allowInsecure') == '1': diff --git a/parsers/tuic.py b/parsers/tuic.py index 355e47e3f..a8e77815f 100644 --- a/parsers/tuic.py +++ b/parsers/tuic.py @@ -24,7 +24,8 @@ def parse(data): 'heartbeat': '10s', 'tls': { 'enabled': True, - 'alpn': (netquery.get('alpn') or "h3").strip('{}').split(',') + 'alpn': (netquery.get('alpn') or "h3").strip('{}').split(','), + 'insecure': False } } if netquery.get('allow_insecure') == '1' :