-
Notifications
You must be signed in to change notification settings - Fork 3
feat: local DNS server with Hickory #219
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 G 10000 itHub”, 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
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.
Pull Request Overview
This PR introduces a new local DNS server implementation using Hickory instead of dnsmasq, updating multiple modules to integrate the new functionality. Key changes include:
- Adding a new async function to start a DNS server in local-server/src/lib.rs.
- Replacing dnsmasq usage with a new LocalDnsServer implementation in linkup-cli.
- Adjusting command and health check logic to accommodate the new DNS service integration.
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
local-server/src/lib.rs | Added start_dns_server function using hickory_server libraries. |
local-server/Cargo.toml | Added dependency on hickory-server and updated hyper-rustls config. |
linkup-cli/src/services/mod.rs | Replaced dnsmasq declarations with LocalDnsServer integration. |
linkup-cli/src/services/local_server.rs | Modified command startup logic for LocalServer. |
linkup-cli/src/services/local_dns_server.rs | Introduced a new LocalDnsServer implementation. |
linkup-cli/src/commands/stop.rs | Updated to stop LocalDnsServer instead of dnsmasq. |
linkup-cli/src/commands/start.rs | Updated to start LocalDnsServer in place of dnsmasq on macOS. |
linkup-cli/src/commands/server.rs | Added ServerKind::Dns support to start the DNS server. |
linkup-cli/src/commands/health.rs | Updated background services health checks to include DNS Server. |
docs/src/content/docs/explanation/how-it-works.md | Revised documentation to reflect the new local DNS service. |
Files not reviewed (1)
- linkup-cli/install.sh: Language not supported
Comments suppressed due to low confidence (3)
local-server/src/lib.rs:143
- Using unwrap here may cause a panic if the DNS name format is incorrect; consider using proper error handling.
let record_name = Name::from_str(&format("{linkup_session_name}.{domain}.")).unwrap();
linkup-cli/src/commands/health.rs:122
- The function local_dns::is_installed is referenced but not defined; consider updating this check to use the new LocalDnsServer implementation or adding the required function.
if local_dns::is_installed(&crate::local_config::managed_domains(Some(state), &None)) {
linkup-cli/src/commands/health.rs:81
- Typo in struct name 'BackgroudServices'; consider renaming to 'BackgroundServices'.
struct BackgroudServices {
65f9d36
to
6c04ab2
Compare
6c04ab2
to
d72e286
Compare
This will be merged to release `3.0.0`. Closes SHIP-2057 ### Changelog: - Drop Caddy as a dependency and use self-signed certificates. - #201 - #207 - #212 - #215 - #217 - Drop dnsmasq as a dependency and use a local Hickory server. - #219 - #224 - Support pre-release (beta) versions based on changes to `next` branch. - #204 - #205 - #211 - #213 - #214 - #221 - Use anyhow for application errors instead of "global" thiserror enum. - #218 - Stop relying on pidfiles for background services - #222 - Move installation script from Bash to Python - #223 - #226 - Improve possible orphans resolution - #225 Thank you @diegomartinrecillas @ludwigbacklund @solveigsg12 and @jauniusmentimeter for beta testing it! ❤️
Description
This replaces the dependency on dnsmasq and spin up a local DNS server using Hickory.
Related to SHIP-2057
References