跳到正文

Serverless DNS

维护中
serverless-dns/serverless-dns

运行在 Cloudflare Workers 上的无服务器 DNS 解析器,内置拦截列表,支持 DoH/DoT 和自定义规则,增强隐私和安全。

在 GitHub 查看
星标
3731
Fork
2293
关注
3731
未关闭 Issue
46

该介绍目前仅提供英文版本。

A privacy-focused, serverless DNS resolver built on Cloudflare Workers. It offers DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) support, with built-in blocklists and custom filtering rules for enhanced security and privacy.

Key Features

  • Privacy-First Design:

    • No logging by default
    • No personal data collection
    • Configurable privacy settings
  • Advanced DNS Features:

    • DNS-over-HTTPS (DoH) support
    • DNS-over-TLS (DoT) support
    • DNSSEC validation
    • Custom DNS resolvers
  • Robust Filtering:

    • Built-in blocklists
    • Custom filtering rules
    • Regex pattern matching
    • Domain categorization
  • Serverless Architecture:

    • Runs on Cloudflare Workers
    • Global edge deployment
    • Low latency responses
    • High availability

Quick Start

Using as a DNS Service

  1. DoH Endpoint:
https://your-worker.workers.dev/dns-query
  1. Configure Browser:
    • Firefox: Settings → Network Settings → Enable DNS over HTTPS
    • Chrome: Settings → Privacy and security → Use secure DNS

Deployment

# Clone the repository
git clone https://github.com/serverless-dns/serverless-dns
cd serverless-dns

# Install dependencies
npm install

# Deploy to Cloudflare Workers
wrangler publish

Configuration Options

Blocklist Settings

{
  "blocklists": {
    "ads": true,
    "tracking": true,
    "malware": true,
    "phishing": true,
    "custom": ["example.com", "*.badomain.com"]
  }
}

Privacy Settings

{
  "logging": false,
  "dnssec": true,
  "cacheEnabled": true,
  "upstreamServers": [
    "1.1.1.1",
    "8.8.8.8"
  ]
}

Advanced Features

Custom Rules Engine

  • Pattern Matching: Support for wildcards and regex
  • Category-based Blocking: Block by domain categories
  • Time-based Rules: Apply rules based on time periods
  • Override Options: Whitelist and exception rules

Performance Features

  • Smart Caching: Optimized DNS caching
  • Load Balancing: Multiple upstream DNS servers
  • Health Checks: Automatic failover
  • Edge Computing: Global distribution

Use Cases

  • Privacy Enhancement: Personal DNS filtering
  • Family Protection: Content filtering and safe browsing
  • Enterprise Security: Network-wide threat protection
  • Ad Blocking: System-wide advertisement blocking

Development Features

  • Modular Architecture: Easy to extend and customize
  • Testing Framework: Comprehensive test suite
  • Monitoring: Built-in performance metrics
  • Documentation: Detailed API documentation

Requirements

  • Cloudflare Workers account
  • Node.js 14+ for development
  • Wrangler CLI tool

Documentation

For detailed setup instructions and API documentation, visit the GitHub repository.

License

This project is licensed under the MIT License.

按共同分类和标签排序的同类开源项目。

全部网络项目 →