Skip to content

Nohgh/dns-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DNS Server

A minimalist Authoritative DNS Server implemented in C++ from scratch.

Features

  • Authoritative Only: Provides direct answers for configured zones.
  • UDP Protocol: Handles DNS queries over UDP (Default port: 5300).
  • Binary Parsing: Manual parsing and construction of DNS packets (RFC 1035).
  • A Record Support: Specifically handles IPv4 address lookups.
  • In-Memory Store: Fast record lookup using a hash-map based zone store.

Technical Highlights

  • No external libraries used for DNS protocol handling.
  • Manual bit-manipulation for DNS header flags and fields.
  • Endianness-aware byte serialization/deserialization.
  • Modular architecture: Protocol, Zone, and Utility layers.

Implementation Details

  • Language: C++ 20
  • Build System: CMake
  • Supported Query: Type A (IPv4)
  • Response Codes: NOERROR, NXDOMAIN

About

Authoritative DNS Server

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors