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

fix(cmd): DNS improvements #164

Merged
merged 4 commits into from
Jun 10, 2024
Merged

fix(cmd): DNS improvements #164

merged 4 commits into from
Jun 10, 2024

Conversation

InKryption
Copy link
Contributor

Couldn't identify any issues with just using zig stdlib's version of getAddressList, it appears to work better internationally, and using it means we have one less dependency (we get rid of zigdig).

I also took the time to replace the string buliding with a formatting function for the log, and used an adapted ArrayHashMap(void, void) hash map to deduplicate entrypoints (on that note, should we issue a warning for duplicate domains or anything like that?).

@InKryption InKryption force-pushed the ink/dns-improvement branch from 7c21d0e to f576f5e Compare June 6, 2024 20:29
@InKryption InKryption self-assigned this Jun 6, 2024
@InKryption InKryption requested a review from 0xNineteen June 6, 2024 20:43
@InKryption
Copy link
Contributor Author

Merging this would make merging #166 easier, since it gives us one less dependency to update.

src/cmd/cmd.zig Show resolved Hide resolved
src/cmd/cmd.zig Outdated Show resolved Hide resolved
src/cmd/cmd.zig Outdated Show resolved Hide resolved
src/cmd/cmd.zig Outdated Show resolved Hide resolved
@InKryption InKryption force-pushed the ink/dns-improvement branch from 44ec419 to 00d76a0 Compare June 7, 2024 22:57
@InKryption InKryption requested a review from 0xNineteen June 10, 2024 12:17
@InKryption InKryption force-pushed the ink/dns-improvement branch 2 times, most recently from 7430655 to f8e0fbd Compare June 10, 2024 13:40
Use the stdlib's `std.net.getAddressList` instead of zigdig's. The
latter appears to not work correctly in a Spanish laptop, whilst the
former does.
Also make it deduplicate identical entrypoints.
now that we use `std.net.getAddressList`, we no longer need zigdig,
since all we were using it for was the high-level DNS resolution.
Just use a normal hash set duplicating the entrypoints in the arraylist,
and eschew the custom entrypoint list formatting.
@InKryption InKryption force-pushed the ink/dns-improvement branch from f8e0fbd to 1a5116d Compare June 10, 2024 13:50
@0xNineteen
Copy link
Contributor

looks great - great to remove a dep 🚀

@InKryption InKryption merged commit b10437c into main Jun 10, 2024
2 checks passed
@InKryption InKryption deleted the ink/dns-improvement branch June 10, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants