Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a blacklisting endpoint (instead of a blacklisting reactor and agent wrapper) #8860

Open
matrixbot opened this issue Dec 18, 2023 · 0 comments
Labels

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 18, 2023

This issue has been migrated from #8860.


See matrix-org/synapse#8821 (comment) for background on this.

Currently to apply an IP range blacklist in Synapse it is necessary to wrap the the reactor with BlacklistingReactorWrapper and then the agent with BlacklistingAgentWrapper. Ideally all of this logic could be encompassed in a custom BlacklistingHostnameEndpoint which would implement similar logic to HostnameEndpoint, but apply the blacklisting logic to it (the necessary logic is almost identical to what is currently in _IPBlacklistingResolver).

This should allow creating an agent with Agent. usingEndpointFactory.

Some things to note:

  • This has to fit in somehow with the ProxyAgent (I suspect it should be an either or sort of thing, but not this should be further investigated).
  • The separation of SimpleHttpClient and MatrixFederationClient makes this a bit more difficult.
  • There's also some use of the RedirectAgent which may or may not be involved here.
@matrixbot matrixbot changed the title Dummy issue Implement a blacklisting endpoint (instead of a blacklisting reactor and agent wrapper) Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant