Skip to content

lokesh-katari/DNS-forwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNS Forwarder with Redis Cache

Overview

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.

Features

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.

Installation

Clone the Repository

https://github.com/lokesh-katari/DNS-forwarder.git

navigate to the project directory

./DNS-forwarder

Prerequisites:

Go (version 1.18 or later) Redis Install Dependencies:

go get ./...

Build the Project:

go build

Usage

Configure:

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

Configuration Options

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).

Contributing

Fork the repository. Create a branch for your changes. Make your changes with clear commit messages. Submit a pull request.

DEMO

2024-01-16.01-17-20.mp4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages