Implement FCrDNS and other DNS features#1308
Merged
Xe merged 16 commits intoTecharoHQ:mainfrom Nov 27, 2025
Merged
Conversation
Xe
approved these changes
Nov 24, 2025
Contributor
Xe
left a comment
There was a problem hiding this comment.
This is excellent. I love it. Well done.
All this is missing is docs for the CEL functions in the expressions docs, but I'll submit a patch with them.
| expression: | ||
| all: | ||
| - userAgent.matches("TelegramBot") | ||
| - verifyFCrDNS(remoteAddress, "ptr\\.telegram\\.org$") |
Member
|
This is the first large PR that i've seen where CI actually passed first try, congrats!! 🥳 🎉🎉 |
JasonLovesDoggo
approved these changes
Nov 24, 2025
Contributor
Author
|
So, the |
75316ce to
fe2479e
Compare
Xe
approved these changes
Nov 26, 2025
| - Add support to simple Valkey/Redis cluster mode | ||
| - Open Graph passthrough now reuses the configured target Host/SNI/TLS settings, so metadata fetches succeed when the upstream certificate differs from the public domain. ([1283](https://github.com/TecharoHQ/anubis/pull/1283)) | ||
| - Stabilize the CVE-2025-24369 regression test by always submitting an invalid proof instead of relying on random POW failures. | ||
| - Add Polish locale ([#1292](https://github.com/TecharoHQ/anubis/pull/1309)) |
Contributor
There was a problem hiding this comment.
- Add Polish locale ([#1292](https://github.com/TecharoHQ/anubis/pull/1309))
Signed-off-by: Xe Iaso <me@xeiaso.net>
Add a note to the documentation for `verifyFCrDNS` to clarify that it returns true when no PTR records are found for the given IP address.
The `VerifyFCrDNS` function previously ignored errors returned from reverse DNS lookups. This could lead to incorrect passes when a DNS failure (other than a simple 'not found') occurred. This change ensures that any error from a reverse lookup will cause the FCrDNS check to fail. The test suite for FCrDNS has been updated to reflect this change. The mock DNS lookups now simulate both 'not found' errors and other generic DNS errors. The test cases have been updated to ensure that the function behaves correctly in both scenarios, resolving a situation where two test cases were effectively duplicates.
Corrected a typo in the `verifyFCrDNS` function documentation. Additionally, updated the spelling exception list to include new terms and remove redundant entries.
Signed-off-by: Xe Iaso <me@xeiaso.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #431
Replaces #682
This pr introduces DNS-based verification features, primarily FCrDNS (#431), to improve client validation.
Implements a
VerifyFCrDNS(ip, *pattern)function for strict and pattern-based FCrDNS validation. Adds caching for both forward and reverse DNS lookups to reduce latency and external queries.Exposes new functions to the policy engine:
verifyFCrDNS(ip)verifyFCrDNS(ip, pattern)reverseDNS(ip)lookupHost(hostname)arpaReverseIP(ip)utility for conversion IP to ARPA reverse notationregexSafe(string)utility for safely using dynamic strings in regex patterns.DNS cache TTL can be configured via the
dns_ttlsetting in the policy file (default: 300s).Added policies for Telegram, VK, and Yandex bots with
verifyFCrDNSfor more reliable validation.Checklist:
[Unreleased]section of docs/docs/CHANGELOG.mdnpm run test:integration(unsupported on Windows, please use WSL)