Skip to content

Add ns2dohd#30

Merged
jaromil merged 2 commits into
masterfrom
ns2dohd
Feb 17, 2026
Merged

Add ns2dohd#30
jaromil merged 2 commits into
masterfrom
ns2dohd

Conversation

@danielinux

@danielinux danielinux commented Feb 14, 2026

Copy link
Copy Markdown
Collaborator

This is a localhost-only daemon, running on UDP port 53, that can redirect all the DNS requests from the entire system to a dns-over-https server.

Just start this daemon and set your /etc/resolv.conf to nameserver 127.0.0.1. All your programs will now use DoH.

This PR also add manpages for both dohd and ns2dohd, and a 'make install' target.

Copilot AI review requested due to automatic review settings February 14, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown

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 adds the ns2dohd daemon, a localhost-only DNS-to-DoH forwarder that runs on port 53, comprehensive testing infrastructure including unit tests and stress tests, manpages for both daemons, and a make install target. The changes also include significant improvements to dohd's core architecture: memory pooling for improved performance, client hash table for O(1) lookups, epoll-based event handling, request timeout support, and TLS 1.3 with session tickets.

Changes:

  • Added ns2dohd daemon for system-wide DNS-to-DoH forwarding on localhost
  • Replaced malloc/free with memory pools for client_data and req_slot allocations
  • Migrated libevquick from poll to epoll for improved scalability
  • Added comprehensive test suite (unit tests, integration tests, stress tests, memory leak detection)
  • Added manpages and installation targets

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/dohd.c Integrated memory pools, added client hash table, request timeouts, upgraded to TLS 1.3
src/libevquick.c Migrated from poll to epoll, added event validity tracking, deferred event deletion
src/mempool.c/h New fixed-size memory pool implementation with O(1) alloc/free
ns2dohd/ns2dohd.c New DNS-to-DoH forwarder daemon with bootstrap DNS resolution
ns2dohd/README.md Documentation for ns2dohd daemon
test/* Extensive test suite: unit tests, integration tests, stress tests, valgrind/ASAN support
man/*.8 Manpages for dohd and ns2dohd
Makefile Added install/uninstall targets, test targets, support for ns2dohd build
README.md Updated documentation with ns2dohd information

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ns2dohd/ns2dohd.c Outdated
Comment thread src/mempool.c
Comment thread src/libevquick.c
Comment thread ns2dohd/ns2dohd.c
Comment thread test/test_mempool.c
Comment thread src/dohd.c
Comment thread src/dohd.c
Comment thread ns2dohd/ns2dohd.c Outdated
Comment thread ns2dohd/ns2dohd.c
@danielinux danielinux force-pushed the ns2dohd branch 2 times, most recently from b2445cd to ee37617 Compare February 17, 2026 09:04
@jaromil jaromil merged commit 7dce1f0 into master Feb 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants