mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-23 17:34:17 +03:00
Added user agent
This commit is contained in:
parent
43b785eb73
commit
e38cd73f30
@ -51,6 +51,8 @@ BANDWIDTH_TIME = 10
|
||||
# Commands LENGTH (all same length)
|
||||
COMMAND_LENGTH = 4
|
||||
|
||||
VERSION = 'v1.0'
|
||||
|
||||
# Valid commands
|
||||
COMMAND_OPEN = b'OPEN'
|
||||
COMMAND_TEST = b'TEST'
|
||||
|
@ -56,7 +56,7 @@ class Proxy:
|
||||
def _getUdsUrl(cfg: config.ConfigurationType, ticket: bytes, msg: str) -> typing.MutableMapping[str, typing.Any]:
|
||||
try:
|
||||
url = cfg.uds_server + '/' + ticket.decode() + '/' + msg + '/' + cfg.uds_token
|
||||
r = requests.get(url, headers={'content-type': 'application/json'})
|
||||
r = requests.get(url, headers={'content-type': 'application/json', 'User-Agent': f'UDSTunnel-{consts.VERSION}'})
|
||||
if not r.ok:
|
||||
raise Exception(r.content)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user