A lightning-fast, feature-rich DNS server and platform implemented in Go, boasting advanced capabilities including NameSpace Resolution.
- 📡 Complete DNS server functionality
- 🔍 NameSpace Resolution support
- 🏎️ Built with Go for high performance and concurrency
- 💾 Utilizes PostgreSQL for robust data storage
- ⚡ Integrates DiceDB (a Redis alternative) for caching and fast data retrieval
- 🌐 Exposes UDP port for handling DNS connections
- 🖥️ Provides HTTP interface for database connections and management
In the interest of maintaining a streamlined and modern DNS server, we've intentionally excluded certain obsolete or rarely used features:
The following obsolete QTypes are not implemented:
- QTYPE_MD (3): Mail Destination
- QTYPE_MF (4): Mail Forwarder
- QTYPE_MB (7): Mailbox Domain Name
- QTYPE_MG (8): Mail Group Member
- QTYPE_MR (9): Mail Rename Domain Name
These QTypes are no longer in use in modern DNS systems, so we've opted to exclude them for simplicity and efficiency.
Altough this is subjected to change on the later stages of the project.
This DNS server only supports the Internet (IN) class. Other classes are not implemented as they are rarely used in contemporary DNS deployments.
These design decisions help keep our codebase clean, efficient, and focused on modern DNS use cases.
- Go 1.21 or higher
- Docker and Docker Compose
- Git
-
Clone the repository:
git clone https://github.com/shubhexists/dns cd dns
-
Set up the environment file:
cp env.sample .env
Edit the
.env
file to configure your environment variables as needed. -
Start the required services using Docker Compose:
docker compose --env-file .env up -d
This command will start PostgreSQL, DiceDB, and any other required services defined in your
docker-compose.yml
file. -
Install Go dependencies:
go mod tidy
To start the DNS server:
go run cmd/main.go
This command will run your main application, connecting to the services you've set up with Docker Compose. Once started:
- The server will listen for DNS queries on the configured UDP port.
- An HTTP server will be available for database connections and management tasks.
Make sure your firewall allows traffic on the configured UDP port for DNS queries and the HTTP port for management.
The main configuration is handled through the .env
file. Make sure to review and adjust the variables in this file according to your needs. Key configuration points include:
- UDP port for DNS connections
- HTTP port for database management
- Database connection details
- DiceDB connection details
Yet to be Documented, Please stay tuned
We welcome contributions! Please see our Contributing Guide for more details.
This project is licensed under the MIT License - see the LICENSE file for details.
- shubhexists - shubhexists
- well-mannered-goat - well-mannered-goat
Do star ⭐ the project to give us a boost. Would mean a lot!