8000 feat: local DNS server with Hickory by augustoccesar · Pull Request #219 · mentimeter/linkup · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full"> Dismiss alert

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

Merged
merged 6 commits into from
Mar 31, 2025

Conversation

augustoccesar
Copy link
Collaborator
@augustoccesar augustoccesar commented Mar 31, 2025

Description

This replaces the dependency on dnsmasq and spin up a local DNS server using Hickory.

Related to SHIP-2057

References

@augustoccesar augustoccesar requested a review from Copilot March 31, 2025 06:53
@augustoccesar augustoccesar self-assigned this Mar 31, 2025
Copy link
@Copilot Copilot AI left a 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 {

@augustoccesar augustoccesar force-pushed the augustoccesar/explore-local-dns-server branch 2 times, most recently from 65f9d36 to 6c04ab2 Compare March 31, 2025 08:21
@augustoccesar augustoccesar force-pushed the augustoccesar/explore-local-dns-server branch from 6c04ab2 to d72e286 Compare March 31, 2025 08:28
@augustoccesar augustoccesar marked this pull request as ready for review March 31, 2025 08:37
@augustoccesar augustoccesar requested review from ostenbom and a team March 31, 2025 08:37
@augustoccesar augustoccesar merged commit f7d4380 into next Mar 31, 2025
6 checks passed
@augustoccesar augustoccesar deleted the augustoccesar/explore-local-dns-server branch March 31, 2025 11:09
augustoccesar added a commit that referenced this pull request Apr 9, 2025
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! ❤️
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0