All Projects → faicker → Greendns

faicker / Greendns

Licence: mit
A nonpoisonous and CDN-friendly Recursive DNS Resolver

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Greendns

Jare
Free and Instant Content Delivery Network (CDN)
Stars: ✭ 116 (-39.9%)
Mutual labels:  cdn
P2p Cdn
WebTorrent CDN with graceful degradation
Stars: ✭ 139 (-27.98%)
Mutual labels:  cdn
Replacegooglecdn
♋ 一个 Chrome 插件:将 Google CDN 替换为国内的。
Stars: ✭ 2,400 (+1143.52%)
Mutual labels:  cdn
Notebook
我的技术笔记本~
Stars: ✭ 118 (-38.86%)
Mutual labels:  cdn
Bootstrap.native
If you are looking for Bootstrap without jQuery, this is it.
Stars: ✭ 1,693 (+777.2%)
Mutual labels:  cdn
Nginxconfig.io
⚙️ NGINX config generator on steroids 💉
Stars: ✭ 14,983 (+7663.21%)
Mutual labels:  cdn
Edge
A set of useful libraries for Edge Apps. Run locally, write tests, and integrate it into your deployment process. Move fast and maybe don't break things? Because, gosh darnit, you're an adult.
Stars: ✭ 105 (-45.6%)
Mutual labels:  cdn
Jquery.redirect
jQuery Redirect Plugin
Stars: ✭ 182 (-5.7%)
Mutual labels:  cdn
Packages
📦 Package configurations - The #1 free and open source CDN built to make life easier for developers.
Stars: ✭ 139 (-27.98%)
Mutual labels:  cdn
Terraform Aws Cloudfront S3 Cdn
Terraform module to easily provision CloudFront CDN backed by an S3 origin
Stars: ✭ 162 (-16.06%)
Mutual labels:  cdn
Cash
HTTP response caching for Koa. Supports Redis, in-memory store, and more!
Stars: ✭ 122 (-36.79%)
Mutual labels:  cdn
Toastr
👀 toastr.js notifications for Laravel 5 and Lumen
Stars: ✭ 133 (-31.09%)
Mutual labels:  cdn
P2p Cdn Sdk Javascript
Free p2p cdn github javascript sdk to reduce video streaming costs of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀
Stars: ✭ 158 (-18.13%)
Mutual labels:  cdn
Cdn
Content Delivery Network on the top of MongoDb GridFs with on-the-fly image crop/resize
Stars: ✭ 117 (-39.38%)
Mutual labels:  cdn
Peardownloader.js
一个支持多协议、多源、混合P2P-CDN的下载器
Stars: ✭ 170 (-11.92%)
Mutual labels:  cdn
Decentraleyes
This repository has a new home: https://git.synz.io/Synzvato/decentraleyes
Stars: ✭ 1,452 (+652.33%)
Mutual labels:  cdn
Srs
SRS is a simple, high efficiency and realtime video server, supports RTMP, WebRTC, HLS, HTTP-FLV, SRT and GB28181.
Stars: ✭ 16,734 (+8570.47%)
Mutual labels:  cdn
Cdn
CDN is a Just-in-time asset manipulation and delivery application, providing a complete content distribution/delivery solution
Stars: ✭ 192 (-0.52%)
Mutual labels:  cdn
Media Server
A brpc-based server to host and proxy live streams
Stars: ✭ 175 (-9.33%)
Mutual labels:  cdn
Sites Using Cloudflare
💔 Archived list of domains using Cloudflare DNS at the time of the CloudBleed announcement.
Stars: ✭ 1,914 (+891.71%)
Mutual labels:  cdn

Package Build Status Coverage Status

greendns

A DNS recursive resolve server to avoid result being poisoned and friendly to CDN. It will qeury dns servers at the same time and don't wait for all responses. It's more efficient and quicker than ChinaDNS.

CDN-friendly means the resolved IP is the best(Same ISP and the nearest). The Foreign DNS with edns-client-subnet returned IP is not that accurate, especially for the local small ISP.

You must config at least two dns servers. One part is local and poisoned, the other part is unpoisoned(tunnel through VPN or use OpenDNS 443/5353 port, dnscrypt-proxy is recommended).

How it works

First filter poisoned ip with blocked iplist with -b argument.
Second,
                                       | A record is local | A record is foreign
    local and poisoned dns server      |    a              |   b
    unpoisoned dns server              |    c              |   d

From the matrix, we get the result as follows,
ac: use local dns server result
ad: use local dns server result
bc: impossible. use unpoisoned dns server result
bd: use unpoisoned dns server result

Conclusion,
Using local dns server result if returned A record is local.
Using unpoisoned dns server result if returned A record is Foreign.

It has two assumptions,

  • the polluted domain is foreign.
  • the A record in poisoned response is foreign.

Install

pip install greendns

Run

terminal command

greendns -r greendns

daemon service

go to services

Dockerfile

go to greendns-container

docker stack (recommended)

go to greendns-stack

Test

dig www.google.com @127.0.0.1 -p1053

Configure

greendns -r greendns -h
usage: greendns [-h] [-r HANDLER] [-p PORT] [-t TIMEOUT] [-l LOGLEVEL]
                [-m MODE] [--lds LDS] [--rds RDS] [-f LOCALROUTE]
                [-b BLACKLIST] [--rfc1918] [--cache]

optional arguments:
  -h, --help
  -r HANDLER, --handler HANDLER
                        Specify handler class, greendns|quickest (default:
                        None)
  -p PORT, --port PORT  Specify listen port or ip (default: 127.0.0.1:1053)
  -t TIMEOUT, --timeout TIMEOUT
                        Specify upstream timeout (default: 1.5)
  -l LOGLEVEL, --log-level LOGLEVEL
                        Specify log level, debug|info|warning|error (default:
                        info)
  -m MODE, --mode MODE  Specify io loop mode, select|epoll (default: select)
  --lds LDS             Specify local poisoned dns servers (default:
                        223.5.5.5:53,114.114.114.114:53)
  --rds RDS             Specify unpoisoned dns servers (default:
                        tcp:208.67.222.220:5353,9.9.9.9:9953)
  -f LOCALROUTE, --localroute LOCALROUTE
                        Specify local routes file (default:
                        /home/etc/greendns/localroute.txt)
  -b BLACKLIST, --blacklist BLACKLIST
                        Specify ip blacklist file (default:
                        /home/etc/greendns/iplist.txt)
  --rfc1918             Specify if rfc1918 ip is local (default: False)
  --cache               Specify if cache is enabled (default: False)

Perf

benchmark result

perf.md

profile

prof.md

Acknowledgements

License

This project is under the MIT license. See the LICENSE file for the full license text.

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