nostream icon indicating copy to clipboard operation
nostream copied to clipboard

Interception of published events for processing

Open Semisol opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. I think that interception of all incoming events would be useful for:

  • people creating their own filters for spam
  • dynamic whitelists
  • pay-per-event relays

Describe the solution you'd like There should be a way for any app to connect to the relay (gRPC, WS, doesn't matter, and could probably have authentication) and hook into all events being sent with the following information included:

  • IP address (should account for X-Forwarded-For)
  • The event itself
  • the origin header

and the connected client could answer with one of the following:

  • accept
  • silently drop (OK as if nothing happened but do not persist and relay)
  • drop (with a custom notice)

in the future, AUTH could be required. there should be a configuration option to block all event publishing if there is no connected client that is intercepting the events. (such as for a dynamic whitelist, I wouldn't want to allow non-whitelisted people from posting because the script I wrote went down)

Describe alternatives you've considered None

Additional context In the future, this could be extended to more things.

Semisol avatar Dec 29 '22 19:12 Semisol

Just came here to explore if this was possible with nostream. We would implement this on Vida, if it were a thing, to make a paid relay. Happy to help!

lylepratt avatar Jan 03 '23 01:01 lylepratt