Skip to content

feat: REQ filter validation#163

Merged
hoytech merged 5 commits intohoytech:masterfrom
getAlby:feat-req-filters-validation
Mar 2, 2026
Merged

feat: REQ filter validation#163
hoytech merged 5 commits intohoytech:masterfrom
getAlby:feat-req-filters-validation

Conversation

@frnandu
Copy link
Copy Markdown

@frnandu frnandu commented Nov 27, 2025

Evaluating strfry as a NWC relay alternative implementation we need such validation of REQ filters

  filterValidation {
        ## Example: Strict NWC relay configuration (similar to Alby's relay)
        enabled = true
        maxFiltersPerReq = 3
        minFiltersPerReq = 1
        maxKindsPerFilter = 3
        allowedKinds = "13194,23194,23195,23196,23197"
        requireAuthorOrTag = true
    }
  

@frnandu frnandu changed the title Add REQ filter validation feature: REQ filter validation Nov 27, 2025
@frnandu frnandu changed the title feature: REQ filter validation feat: REQ filter validation Nov 27, 2025
@dskvr
Copy link
Copy Markdown

dskvr commented Dec 10, 2025

@frnandu every one of these filter validations can be achieved with plugins.

@frnandu
Copy link
Copy Markdown
Author

frnandu commented Dec 10, 2025

@frnandu everyone one of these filter validations can be achieved with plugins.

AFAIK plugins are only for event writing policies, not for REQuests filters.

@dskvr
Copy link
Copy Markdown

dskvr commented Dec 14, 2025

Ah, yeah, you're right 👍

@hoytech
Copy link
Copy Markdown
Owner

hoytech commented Feb 28, 2026

Thank you, and sorry I've let this sit for so long. The change looks reasonable to me, except for a couple minor things:

  • The allowedKinds config string is parsed on every request, which is inefficient. We can make it parse only once per thread, per config file update in the same way as getServerInfoHttpResponse and the like.
  • There is currently a merge conflict against master.

I will fix this and merge for the next release.

@hoytech hoytech merged commit e638325 into hoytech:master Mar 2, 2026
@hoytech
Copy link
Copy Markdown
Owner

hoytech commented Mar 2, 2026

Merged. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants