Giter Site home page Giter Site logo

cfdns's Introduction

cfdns

简介

测试Cloudflare CDN 延迟,获取最快的IPV4。

内置DNS服务, 无需手动改Hosts文件。

安装

使用二进制

  • 下载release
  • RUST_LOG=info ./cfdns

Docker

自行编译

请确保您已正确安装了Rust.

  • git clone https://github.com/ClassmateLin/cfdns.git && cd cfdns

  • cargo build --release, 编译结果在./target/release目录下。

使用

配置说明

├── cfdns
└── conf
    ├── config.toml
    ├── domain.txt
    └── ip.txt
  • ip.txt的内容是Cloudflare的地址范围, 可自行精简。
  • domain.txt的内容是需要经过cfdns返回最快的IP的域名, 一行一个。
  • config.toml是配置文件, 详细内容请自行看配置文件。

运行程序

  • 使用命令RUST_LOG=info ./cfdns运行:

runing

  • 使用dig测试:

dig

  • 将设备的DNS配置改为cfdns绑定的地址。

setting

result

其他

  • 可放在路由器中运行, 将上游服务器设置为dnsmasq/smartdns。

todo

  • []填域名不方便, 改为先请求上游DNS服务器,解析到ip地址范围在CloudflareSpeed的地址段内,再返回最快的ip。

cfdns's People

Watchers

 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.