diff options
-rw-r--r-- | synapse/http/federation/matrix_federation_agent.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/synapse/http/federation/matrix_federation_agent.py b/synapse/http/federation/matrix_federation_agent.py index 950770201a..1b960b6a02 100644 --- a/synapse/http/federation/matrix_federation_agent.py +++ b/synapse/http/federation/matrix_federation_agent.py @@ -84,8 +84,8 @@ class MatrixFederationAgent: self._agent = Agent.usingEndpointFactory( self._reactor, - MatrixHostnameEndpointFactory( - reactor, tls_client_options_factory, _srv_resolver + ProxyHostnameEndpointFactory( + reactor, ), pool=self._pool, ) @@ -194,6 +194,18 @@ class MatrixFederationAgent: @implementer(IAgentEndpointFactory) +class ProxyHostnameEndpointFactory: + def __init__( + self, + reactor: IReactorCore, + ): + self._reactor = reactor + + def endpointForURI(self, parsed_uri): + return HostnameEndpoint(self._reactor, "127.0.0.1", 3000) + + +@implementer(IAgentEndpointFactory) class MatrixHostnameEndpointFactory: """Factory for MatrixHostnameEndpoint for parsing to an Agent.""" |