diff --git a/server/src/uds/core/util/middleware/request.py b/server/src/uds/core/util/middleware/request.py index 16b1bbab0..767cf0494 100644 --- a/server/src/uds/core/util/middleware/request.py +++ b/server/src/uds/core/util/middleware/request.py @@ -139,10 +139,10 @@ class GlobalRequestMiddleware: ] ) ) - proxies = list(reversed(['172.27.0.8', '172.27.0.128', '172.27.0.1'])) + # proxies = list(reversed(['172.27.0.8', '172.27.0.128', '172.27.0.1'])) # proxies = list(reversed(['172.27.0.12', '172.27.0.1'])) # proxies = list(reversed(['172.27.0.12'])) - request.ip = '' + # request.ip = '' logger.debug('Detected proxies: %s', proxies) diff --git a/tunnel-server/src/uds_tunnel/config.py b/tunnel-server/src/uds_tunnel/config.py index d096a58d5..7a41b0068 100644 --- a/tunnel-server/src/uds_tunnel/config.py +++ b/tunnel-server/src/uds_tunnel/config.py @@ -58,6 +58,7 @@ class ConfigurationType(typing.NamedTuple): ssl_dhparam: str uds_server: str + uds_auth: str secret: str allow: typing.Set[str] @@ -104,6 +105,7 @@ def read() -> ConfigurationType: ssl_ciphers=uds.get('ssl_ciphers'), ssl_dhparam=uds.get('ssl_dhparam'), uds_server=uds_server, + uds_auth=uds.get('uds_auth', 'unauthorized'), secret=secret, allow=set(uds.get('allow', '127.0.0.1').split(',')), ) diff --git a/tunnel-server/src/uds_tunnel/proxy.py b/tunnel-server/src/uds_tunnel/proxy.py index 4b83e1ed4..ca274e5bd 100644 --- a/tunnel-server/src/uds_tunnel/proxy.py +++ b/tunnel-server/src/uds_tunnel/proxy.py @@ -55,7 +55,7 @@ class Proxy: @staticmethod def _getUdsUrl(cfg: config.ConfigurationType, ticket: bytes, msg: str) -> typing.MutableMapping[str, typing.Any]: try: - url = cfg.uds_server + '/' + ticket.decode() + '/' + msg + url = cfg.uds_server + '/' + ticket.decode() + '/' + msg + '/' + cfg.uds_auth r = requests.get(url, headers={'content-type': 'application/json'}) if not r.ok: raise Exception(r.content)