Conversation
There was a problem hiding this comment.
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
ns2dohddaemon 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.
b2445cd to
ee37617
Compare
jaromil
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.conftonameserver 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.