Skip to content

Commit

Permalink
fix tls
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock committed Feb 26, 2024
1 parent 333d74b commit f4a1a04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion parsers/hysteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(',')
Expand Down
3 changes: 2 additions & 1 deletion parsers/hysteria2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
3 changes: 2 additions & 1 deletion parsers/tuic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' :
Expand Down

0 comments on commit f4a1a04

Please sign in to comment.