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

Add support for v2 host announcements #1669

Draft
wants to merge 17 commits into
base: its-happening
Choose a base branch
from

Conversation

ChrisSchinnerl
Copy link
Member

@ChrisSchinnerl ChrisSchinnerl commented Nov 13, 2024

This PR changes the host_announcements table to a host_addresses table which holds all the announced addresses of a host including the protocol they were announced for. It also adds a new field to the Host type which contains the announced v2 addresses.

Since things are now getting a lot more complex since hosts can announce multiple IP addresses as well as domain names, we only consider the first 5 announced addresses per protocol. Regardless of whether they are IP addresses or domains.
The redundant IP check will still enforce the same rules. e.g. announcing 3 domains and 2 IPs is fine as long as after resolving the domains, the host only ends up with at most 2 IPs where one is IPv4 and the other is IPv6.

For the sake of simplicity and because I'd like to avoid this going out of hand I also removed the persisted addresses. We still cache resolved addresses in our dialer, but we don't consider unresolvable hosts redundant anymore. Instead we keep them until the scanner causes the to drop out of the set.

Closes #1668

@ChrisSchinnerl ChrisSchinnerl self-assigned this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant