All Projects → xiaoyang-liu-cs → Encrypted Dns

xiaoyang-liu-cs / Encrypted Dns

Licence: apache-2.0
DNS-over-HTTPS and DNS-over-TLS server and forwarder. (RFC 8484, RFC 7858, RFC 7871)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Encrypted Dns

Sliver
Adversary Simulation Framework
Stars: ✭ 1,348 (+434.92%)
Mutual labels:  dns-server
Routedns
DNS stub resolver, proxy and router with support for DoT, DoH, DoQ, and DTLS
Stars: ✭ 153 (-39.29%)
Mutual labels:  dns-server
Ztdns
DNS server for a ZeroTier virtual network
Stars: ✭ 202 (-19.84%)
Mutual labels:  dns-server
Minidyndns
A simple DynDNS server with an build in HTTP interface to update IPs
Stars: ✭ 101 (-59.92%)
Mutual labels:  dns-server
Trust Dns
A Rust based DNS client, server, and resolver
Stars: ✭ 2,155 (+755.16%)
Mutual labels:  dns-server
Dnsguide
A guide to writing a DNS Server from scratch in Rust
Stars: ✭ 2,226 (+783.33%)
Mutual labels:  dns-server
Tor Router
A SOCKS, HTTP and DNS proxy for distributing traffic across multiple instances of Tor
Stars: ✭ 69 (-72.62%)
Mutual labels:  dns-server
Blahdns
A small hobby ads block dns project with doh, dot, dnscrypt support.
Stars: ✭ 228 (-9.52%)
Mutual labels:  dns-server
Unbound Docker
Unbound DNS Server Docker Image
Stars: ✭ 147 (-41.67%)
Mutual labels:  dns-server
Bind9
Mirror of https://gitlab.isc.org/isc-projects/bind9, please submit issues and PR/MRs in the GitLab.
Stars: ✭ 197 (-21.83%)
Mutual labels:  dns-server
Dns
Docker DNS server on steroids to access DNS-over-TLS from Cloudflare, Google, Quad9, Quadrant or CleanBrowsing
Stars: ✭ 111 (-55.95%)
Mutual labels:  dns-server
Kathara
A lightweight container-based network emulation system.
Stars: ✭ 139 (-44.84%)
Mutual labels:  dns-server
Dcompass
[WIP] High-performance programmable DNS server aiming at robustness, speed, and flexibility
Stars: ✭ 174 (-30.95%)
Mutual labels:  dns-server
Blackhat Go
As hackers, we put a premium on function over elegance as time is always scarce. When you need to quickly create a solution to a problem, style concerns come secondary.
Stars: ✭ 101 (-59.92%)
Mutual labels:  dns-server
Pdns
PowerDNS Authoritative, PowerDNS Recursor, dnsdist
Stars: ✭ 2,575 (+921.83%)
Mutual labels:  dns-server
Dockerweb
A docker-powered bash script for shared web hosting management. The ultimate Docker LAMP/LEMP Stack.
Stars: ✭ 89 (-64.68%)
Mutual labels:  dns-server
Pihole Unbound
Guide to setup Unbound recursive DNS resolver with Pi-Hole. With additional configs for speed and security!! 🚀🔒
Stars: ✭ 165 (-34.52%)
Mutual labels:  dns-server
Secureoperator
A DNS-protocol proxy for DNS-over-HTTPS providers, such as Google and Cloudflare
Stars: ✭ 241 (-4.37%)
Mutual labels:  dns-server
Nativepayload dns
C# code for Transferring Backdoor Payloads by DNS Traffic and Bypassing Anti-viruses
Stars: ✭ 228 (-9.52%)
Mutual labels:  dns-server
Mosdns
一个 DNS 转发/分流器。
Stars: ✭ 165 (-34.52%)
Mutual labels:  dns-server

Encrypted-DNS

License Releases Downloads

Issues | Pull requests | Contributors

Introduction

Encrypted-DNS operates as a DNS server that forward DNS queries over UDP, TCP, TLS or HTTPS, thus preventing your device from DNS cache poisoning and censorship. It could also cache DNS records to accelerate further queries, block specific client, and ignore particular domain names.

Features

  • Encrypted DNS upstream servers (DNS-over-HTTPS, DNS-over-TLS)
  • Improve accuracy with EDNS-Client-Subnet
  • Authenticate DNS response with DNSSEC
  • Transparent redirection of specific domains to specific resolvers
  • Send queries through HTTP proxies
  • Cache DNS response with default or customized TTL to reduce latency
  • Force Safe search on search engines such as Google, Bing, DuckDuckGo
  • Firewall rules: Rate limiting, client blacklist, and disable AAAA or ANY lookups

Installation

  • Install Python 3.6+

  • Install encrypted-dns package via pip

$ python3 -m pip install encrypted-dns
  • Generate and edit config file
$ sudo encrypted-dns
$ vim ~/.config/encrypted_dns/config.json
  • Run Encrypted-DNS Server
$ sudo encrypted-dns
  • Test DNS Lookup
Linux or MacOS:
$ dig @127.0.0.1 www.google.com

Windows:
$ nslookup www.google.com 127.0.0.1
  • Change DNS Address to 127.0.0.1

Configuration

Encrypted-DNS will generate a JSON file ~/.config/encrypted_dns/config.json

Inbounds

Encrypted-DNS will listen on the address and ports to receive DNS lookups.

The format of each inbound is protocol://address:port.

Currently, Encrypted-DNS only supports inbounds with udp and tcp protocols.

If protocol is not provided, Encrypted-DNS will listen to this inbound address through the udp protocol.

If port is not provided, Encrypted-DNS will use the default port of each protocol. (53 for udp and tcp)

'inbounds': [
                '0.0.0.0',
                '0.0.0.0:5301',
                'tcp://0.0.0.0:5302'
            ]

Outbounds

Encrypted-DNS will forward the DNS quires to the upstream DNS servers.

The Outbounds is a JSON array of DNS groups.

Here is an example of a DNS group:

'outbounds': [
    {
        'tag': 'unencrypted',
        'dns': ['1.0.0.1', 'tcp://8.8.4.4'],
        'concurrent': False,
        'domains': ['time.windows.com', sub:youtube.com', 'include:netflix.com']
    },
    {
        'tag': 'encrypted',
        'dns': ['https://cloudflare-dns.com', 'tls://dns.google'],
        'proxies': {
            'http': 'http://127.0.0.1:1088',
            'https': 'http://127.0.0.1:1088'
        },
        'concurrent': False,
        'domains': ['all']
    }
]

tag is the name of the DNS group

dns is an array of DNS upstreams

  • The format of each upstream is protocol://address:port
  • Encrypted-DNS supports these protocols: udp, tcp, tls, https
  • If protocol is not provided, Encrypted-DNS will connect to the upstream through udp protocol.
  • If port is not provided, Encrypted-DNS will use the default port of each protocol. (53 for udp and tcp, 853 for tls, 443 for https)

concurrent

  • If concurrent is True, Encrypted-DNS will forward queries to all servers in this group concurrently and send the first response to the client
  • If concurrent is False, Encrypted-DNS will forward queries to a random server in this group.

Encrypted-DNS will only forward queries to this group only if the domain is included in the domains. For example:

  • www.google.com: exact domain
  • sub:youtube.com: subdomains of youtube.com, such as m.youtube.com, www.youtube.com
  • include:netflix.com: domains include netflix.com, such as www.netflix.com, netflix.com.example.com, whatisnetflix.command
  • all: all domains

Bootstrap DNS Group

Encrypted-DNS will send DNS queries to the server in the bootstrap DNS group to retrieve the IP addresses of DNS-over-HTTPS or DNS-over-TLS server.

If the group is not specified, Encrypted-DNS will use 1.0.0.1 to resolve the IP addresses.

'outbounds': [
    {
        'tag': 'bootstrap',
        'dns': ['1.0.0.1', '8.8.4.4']
    },
    ...
]

DNS Cache

Cache DNS responses to reduce latency for further queries.

If override_ttl is -1, Encrypted-DNS will use default TTL for each record.

'dns_cache': {
    'enable': True,
    'override_ttl': 3600
}

Firewall

  • refuse_ANY will ignore all queries with ANY type since it's often used in DNS reflection attacks.
  • AAAA_disabled will ignore all quires with AAAA type.
  • rate_limit will limit the amount of quires Encrypted-DNS could process every minute.
  • client_blacklist will ignore all quires sent by specific clients.
'firewall': {
    'refuse_ANY': True,
    'AAAA_disabled': False,
    'rate_limit': 30,
    'client_blacklist': [
        '128.97.0.0',
    `   '128.97.0.1'
    ]
}

Rules

  • force_safe_search will enable Safe search on search engines: Google, Bing, Yahoo, DuckDuckGo, and Youtube.
  • hosts will specify A record or CNAME record for domain names.

Rules to match domain in hosts:

  • www.google.com: exact domain
  • sub:youtube.com: subdomains of youtube.com, such as m.youtube.com, www.youtube.com
  • include:netflix.com: domains include netflix.com, such as www.netflix.com, netflix.com.example.com, whatisnetflix.command
  • all: all domains
'rules': {
    'force_safe_search': False,
    'hosts': {
        'localhost': '127.0.0.1',
        'sub:cloudflare-dns.com': '1.0.0.1',
        'dns.google': '8.8.4.4'
    }
},

EDNS Client Subnet

EDNS Client Subnet is a DNS extension that allows Encrypted-DNS to specify the network subnet for the host on which behalf it is making a DNS query.

This is generally intended to help speed up the delivery of data from CDN, by allowing better use of DNS-based load balancing to select a service address serving the content expected to be hosted at that domain name, when the client computer is in a different network location from the recursive resolver.

To disable this feature, set ecs_ip_address to null.

'ecs_ip_address': '128.97.0.0'
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].