Giter VIP home page Giter VIP logo

dnsrelay's Introduction

DNS Relay Server

Project of BUPT IoT 2022 junior summer school.

Features

Basic Functions

  • Supports all DNS request types
  • Caching mechanism
  • Multi-threaded concurrent handling of requests
  • Customizable blacklist

Advanced Features

  • Support IPv6 address
  • DNS load balancing
  • Auto cache cleaning
  • Blacklist expiry time
  • Server logs
  • User configuration
    • Customizable remote DNS server address
    • Enable/disable caching mechanism
    • Customizable thread pool size
    • Customizable cache validity period

Environment requirements

Java 15 or higher

How To Use

Boot settings

Customize your settings in boot.properties.

Add blacklist

Add websites to cache.txt as follows:

blacklist [website you want to block]. 0.0.0.0
blacklist [website you want to block].-v6 ::

If you want to set expiry time, here's an example:

2022/07/02 www.taobao.com. 0.0.0.0
2022/07/02 www.taobao.com.-v6 ::

Assume the cache limit is set to 2 days. Then the server will block www.taobao.com until 2022/07/04.

Start server and test

Run the application and check if the server started successfully on the terminal.

Then create a new terminal window and execute:

nslookup www.bupt.edu.cn 127.0.0.1

The server should return both IPv4 and IPv6 addresses(ipv6 protocol enabled).

Set as default

Now you can set your local DNS server as 127.0.0.1(ipv4) and ::1(ipv6).

Log

If something wrong happens, you can check it in log.txt.

Developer Team

dnsrelay's People

Contributors

jerryzhangzzy avatar zaitianwang avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.