Skip to content

ensdomains/ccip-read-dns-gateway

Repository files navigation

CCIP-Read-DNS-Gateway

Overview

CCIP-Read-DNS-Gateway is a specialized server providing DNS resolution services for ENS domains with a focus on gasless DNSSEC support. It leverages the CCIP-Read protocol to offer efficient, off-chain DNS resolution and DNSSEC validation.

Core Components

  • index.ts: Express server for handling incoming requests. Mostly suitable for self-hosting or cloud development.

  • worker.ts: Cloudflare worker script for handling incoming requests in a (Cloudflare Worker) serverless environment.

  • app.ts: Configures server routes and handlers. Utilizes the @ensdomains/dnsprovejs library for DNS queries and proof generation.

Installation

git clone https://github.com/your-repo/ccip-read-dns-gateway.git
cd ccip-read-dns-gateway
npm install

Configuration

Set the DOH_GATEWAY_URL environment variable to specify your DNS-over-HTTPS gateway:

export DOH_GATEWAY_URL=https://your-doh-gateway.com/dns-query

Usage

Local Development

To run the server locally:

npm start

The server will start on http://localhost:8080 by default.

Cloudflare Worker Deployment

  1. Install Wrangler CLI:

    npm install -g @cloudflare/wrangler
  2. Authenticate with your Cloudflare account:

    wrangler login
  3. Update wrangler.toml with your DoH gateway URL:

    [vars]
    DOH_GATEWAY_URL = "https://your-doh-gateway.com/dns-query"
  4. Deploy the worker:

    wrangler publish

API Endpoints

  • GET /: Health check endpoint
  • POST /: Main endpoint for DNS resolution and proof generation

Dependencies

License

MIT

Support

For support, please open an issue in the GitHub repository or contact our support team at [email protected].

Releases

No releases published

Packages

No packages published