Skip to content

Commit

Permalink
add trojan multiplex
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock authored Oct 30, 2023
1 parent bc7d061 commit 5870c97
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions parsers/trojan.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,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 5870c97

Please sign in to comment.