-
-
Notifications
You must be signed in to change notification settings - Fork 436
Implement FCrDNS and other DNS features #1308
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
Conversation
Xe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this. So much.
|
This is the first large PR that i've seen where CI actually passed first try, congrats!! 🥳 🎉🎉 |
|
So, the |
75316ce to
fe2479e
Compare
| - 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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add Polish locale ([#1292](https://github.com/TecharoHQ/anubis/pull/1309))
Signed-off-by: Xe Iaso <[email protected]>
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 <[email protected]>
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)