A simple and efficient DNS forwarder written in Go. Forwards DNS queries to upstream servers while caching responses in Redis for faster subsequent lookups. Aims to improve DNS performance and reduce load on upstream servers.
Redis Caching: Stores DNS responses in Redis for rapid retrieval. Upstream Server Support: Forwards queries to multiple upstream DNS servers. Customizable Configuration: Adjust settings for DNS servers, Redis connection, and caching behavior. Error Handling and Logging: Provides meaningful error messages and logs for troubleshooting.
https://github.com/lokesh-katari/DNS-forwarder.git
navigate to the project directory
./DNS-forwarder
Go (version 1.18 or later) Redis Install Dependencies:
go get ./...
Build the Project:
go build
Set environment variables or edit a configuration file (if available) to specify: Upstream DNS servers Redis connection details Caching options Run the Forwarder:
go run main.go
DNS_SERVERS: A comma-separated list of upstream DNS servers (e.g., "8.8.8.8,1.1.1.1"). REDIS_HOST: Redis hostname or IP address. REDIS_PORT: Redis port (default: 6379). CACHE_TTL: TTL for cached responses in seconds (default: 300).
Fork the repository. Create a branch for your changes. Make your changes with clear commit messages. Submit a pull request.