Compare commits

...

2 Commits

Author SHA1 Message Date
Erik Johnston
0c2ab9c90a Unwrap blacklisting reactor 2021-06-24 16:16:17 +01:00
Erik Johnston
a77aab60ae Use a local federation proxy 2021-06-24 16:06:40 +01:00

View File

@@ -84,8 +84,8 @@ class MatrixFederationAgent:
self._agent = Agent.usingEndpointFactory(
self._reactor,
MatrixHostnameEndpointFactory(
reactor, tls_client_options_factory, _srv_resolver
ProxyHostnameEndpointFactory(
reactor._reactor,
),
pool=self._pool,
)
@@ -193,6 +193,18 @@ class MatrixFederationAgent:
return res
@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."""