summary refs log tree commit diff
path: root/synapse/http/proxyagent.py
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2023-07-06 09:51:06 -0500
committerEric Eastwood <contact@ericeastwood.com>2023-07-06 09:51:06 -0500
commitb01906263409dad09a59bb860794a96ec71d6af2 (patch)
treed39383f6c9a7664b94330a8a41e8c24762057d2f /synapse/http/proxyagent.py
parentFederation outbound proxy (#15773) (diff)
downloadsynapse-b01906263409dad09a59bb860794a96ec71d6af2.tar.xz
Fix TLS when using the `ProxyAgent`
Same fix as https://github.com/matrix-org/synapse/pull/15746

Thanks to @realtyem for pointing it out!

`creatorForNetloc(...)` doesn't come with typing and expects `host`
to be `bytes` instead of a `str`.

`ProxyAgent` was introduced with the federation outbound proxy:
https://github.com/matrix-org/synapse/pull/15773
Diffstat (limited to 'synapse/http/proxyagent.py')
-rw-r--r--synapse/http/proxyagent.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/http/proxyagent.py b/synapse/http/proxyagent.py

index 1fa3adbef2..fd418fc225 100644 --- a/synapse/http/proxyagent.py +++ b/synapse/http/proxyagent.py
@@ -152,7 +152,7 @@ class ProxyAgent(_AgentBase): if federation_proxy.tls: tls_connection_creator = self._policy_for_https.creatorForNetloc( - federation_proxy.host, + federation_proxy.host.encode("utf-8"), federation_proxy.port, ) endpoint = wrapClientTLS(tls_connection_creator, endpoint)