Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🛢 DNS over HTTPS Trusted Root Resolver for Commons Host

NotificationsYou must be signed in to change notification settings

commonshost/playdoh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Statusnpm version

Middleware for Node.js web servers to expose DNS over HTTPS (DoH).

Implement:DNS Queries over HTTPS (DoH) [RFC8484].

Demo: Try it with Firefox

Configure Firefox to use Commons Host DNS over HTTPS in 3 steps. Enjoy a more private and secure Internet.

Playdoh powers the 🐑Commons Host DNS over HTTPS service running on >20 global edge servers. The service is free and public. No tampering, no filtering, no logging.

Using Firefox 64+

  1. OpenPreferences and underNetwork Settings press theSettings... button.

  2. CheckEnable DNS over HTTPS

  3. Enter in theURL field:https://commons.host

Firefox DoH settings

Using Firefox 62

  1. Browse to:about:config

  2. Search:network.trr.

  3. Configure:

    Preference NameValue
    network.trr.mode2
    network.trr.urihttps://commons.host

Firefox settings

Usage

Note: HTTP/2 is the minimumrecommended version of HTTP for use with DoH.

const{ playdoh}=require('playdoh')// Defaultsconstoptions={// udp4 (IPv4) or udp6 (IPv6)protocol:'udp4',// Defaults to 0.0.0.0 (udp4) or ::0 (udp6)localAddress:'',// Defaults to 127.0.0.1 (udp4) or ::1 (udp6)resolverAddress:'',// Standard DNS portresolverPort:53,// Maximum DNS lookup durationtimeout:10000}constmiddleware=playdoh(options)

Returns:middleware(request, response, next)

The middleware function follows the Node.js convention and is compatible with most popular web server frameworks.

Options

protocol

Default:udp4

Can be eitherudp4 orudp6 to indicate whether to connect to the resolver over IPv4 or IPv6 respectively.

localAddress

Default:0.0.0.0 (IPv4) or::0 (IPv6)

The UDP socket is bound to this address.

Use a loopback IP address ('' empty string,localhost,127.0.0.1, or::1) to only accept local DNS resolver responses.

Use a wildcard IP address (0.0.0.0 or::0) to accept remote DNS resolver responses.

resolverAddress

Default:127.0.0.1 (IPv4) or::1 (IPv6)

The IP address of the DNS resolver. Queries are sent via UDP.

See also:List of public DNS service operators on Wikipedia.

resolverPort

Default:53

The port of the DNS resolver.

timeout

Default:10000

Number of milliseconds to wait for a response from the DNS resolver.

Connect

constconnect=require('connect')const{ createSecureServer}=require('http2')constapp=connect()app.use(middleware)constoptions={key:fs.readFileSync('server-key.pem'),cert:fs.readFileSync('server-cert.pem')}constserver=createSecureServer(options,app)server.listen(443)

Fastify

constfastify=require('fastify')({http2:true,https:{key:fs.readFileSync('server-key.pem'),cert:fs.readFileSync('server-cert.pem')}})fastify.use(middleware)fastify.listen(443)

References

Credits

Made byKenny Shen andSebastiaan Deckers for 🐑Commons Host.

About

🛢 DNS over HTTPS Trusted Root Resolver for Commons Host

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp