Skip to content

A high-performance DNS proxy that races multiple DNS-over-HTTPS (DoH) providers to get the fastest response.

License

Notifications You must be signed in to change notification settings

samurai00/race-dns-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

de660c6 · Mar 18, 2025

History

35 Commits
Jan 17, 2025
Jan 10, 2025
Dec 12, 2024
Mar 18, 2025
Feb 18, 2025
Jan 10, 2025
Dec 5, 2024
Jan 13, 2025
Jan 13, 2025

Repository files navigation

Race DNS Proxy

⚠️ Experimental: This project is currently in experimental stage and under active development.

A high-performance DNS proxy that races multiple DNS-over-HTTPS (DoH) providers to get the fastest response.

Features

  • Concurrent DNS queries to multiple providers
  • Automatic failover and retry
  • DNS-over-HTTPS (DoH) support
  • Smart response selection based on speed and status
  • Built with Rust for high performance and reliability
  • Configurable DNS providers via TOML configuration
  • Support domain group configuration to specify different DNS servers for different domains

Dependencies

  • hickory-dns: Used for DNS protocol operations and DoH support.
  • tokio: Provides the asynchronous runtime for handling concurrent DNS queries.
  • rustls: A modern TLS library written in Rust.
  • tracing: Application-level tracing framework.
  • webpki-roots: Mozilla's CA root certificates for use with webpki.

Configuration

Create or modify race-dns-proxy.toml to configure DNS providers:

[providers]
[providers.alidns-doh]
addr = "223.5.5.5:443"
hostname = "dns.alidns.com"
domain_groups = ["default"]

[providers.dnspod-doh]
addr = "1.12.12.12:443"
hostname = "doh.pub"
domain_groups = ["default"]

# Domain Groups Configuration
[domain_groups]
default = [] # All domains

Usage

Run the proxy server:

race-dns-proxy [OPTIONS]

Command Line Options

Usage: race-dns-proxy [OPTIONS]

Options:
  -p, --port <PORT>      DNS server listening port [default: 5653]
      --log <LOG>        Log filepath
  -c, --config <CONFIG>  Configuration file path [default: race-dns-proxy.toml]
  -h, --help             Print help
  -V, --version          Print version

The server will listen for DNS queries and forward them to configured DoH providers.

License

This project is Licensed under MIT License.

About

A high-performance DNS proxy that races multiple DNS-over-HTTPS (DoH) providers to get the fastest response.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published