Skip to content

Commit

Permalink
add vless multiplex
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock authored Oct 30, 2023
1 parent 5870c97 commit 89e049b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion parsers/vless.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def parse(data):
node['tls']['reality'] = {
'enabled': True,
'public_key': netquery.get('pbk'),
'short_id': netquery.get('sid', '')
}
if netquery.get('sid'):
node['tls']['reality']['short_id'] = netquery['sid']
node['tls']['utls'] = {
'enabled': True,
'fingerprint': netquery.get('fp', 'chrome')
Expand All @@ -61,4 +62,16 @@ def parse(data):
'type':'grpc',
'service_name':netquery.get('serviceName', '')
}
if netquery.get('protocol'):
node['multiplex'] = {
'enabled': True,
'protocol': netquery['protocol'],
'max_streams': int(netquery.get('max_streams', '0'))
}
if netquery.get('max_connections'):
node['multiplex']['max_connections'] = int(netquery['max_connections'])
if netquery.get('min_streams'):
node['multiplex']['min_streams'] = int(netquery['min_streams'])
if netquery.get('padding') == 'True':
node['multiplex']['padding'] = True
return node

0 comments on commit 89e049b

Please sign in to comment.