Agent: Consistent format string for set proxy
This commit is contained in:
parent
87b882cb45
commit
3f33bc4a41
|
@ -36,8 +36,6 @@ PBA_FILE_DOWNLOAD = "https://%s/api/pba/download/%s"
|
||||||
# elsewhere.
|
# elsewhere.
|
||||||
TIMEOUT_IN_SECONDS = 15
|
TIMEOUT_IN_SECONDS = 15
|
||||||
|
|
||||||
PROXY_SCHEMA = "%s:%s"
|
|
||||||
|
|
||||||
|
|
||||||
class ControlClient(object):
|
class ControlClient(object):
|
||||||
proxies = {}
|
proxies = {}
|
||||||
|
@ -132,13 +130,9 @@ class ControlClient(object):
|
||||||
proxy_address, proxy_port = proxy_find
|
proxy_address, proxy_port = proxy_find
|
||||||
logger.info("Found tunnel at %s:%s" % (proxy_address, proxy_port))
|
logger.info("Found tunnel at %s:%s" % (proxy_address, proxy_port))
|
||||||
if is_windows_os():
|
if is_windows_os():
|
||||||
ControlClient.proxies["https"] = "http://%s:%s" % (
|
ControlClient.proxies["https"] = f"http://{proxy_address}:{proxy_port}"
|
||||||
proxy_address,
|
|
||||||
proxy_port,
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
ControlClient.proxies["https"] = PROXY_SCHEMA % (proxy_address, proxy_port)
|
ControlClient.proxies["https"] = f"{proxy_address}:{proxy_port}"
|
||||||
logger.info(ControlClient.proxies)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def keepalive():
|
def keepalive():
|
||||||
|
|
Loading…
Reference in New Issue