Merge pull request #1501 from guardicore/tunneling-revert-schema

Changed proxy schema for the agent
This commit is contained in:
VakarisZ 2021-09-29 10:54:03 +03:00 committed by GitHub
commit b791ee16e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -35,6 +35,8 @@ PBA_FILE_DOWNLOAD = "https://%s/api/pba/download/%s"
# elsewhere.
TIMEOUT_IN_SECONDS = 15
PROXY_SCHEMA = "%s:%s"
class ControlClient(object):
proxies = {}
@ -113,7 +115,7 @@ class ControlClient(object):
if proxy_find:
proxy_address, proxy_port = proxy_find
logger.info("Found tunnel at %s:%s" % (proxy_address, proxy_port))
ControlClient.proxies["https"] = "https://%s:%s" % (proxy_address, proxy_port)
ControlClient.proxies["https"] = PROXY_SCHEMA % (proxy_address, proxy_port)
return ControlClient.find_server()
else:
logger.info("No tunnel found")