Skip to main content

quart-doh

quart-doh is a simple DOH (DNS Over HTTPS) server. It resolves DNS query on HTTP.

Implementation

RFC 8484

Json implementation

Quick start

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

pipenv sync -d

pipenv run doh_server

Use with Firefox

in about:config edit::

network.trr.mode;3
network.trr.uri;https://127.0.0.1/dns-query

For the URI, add your URI for your reverse proxy serving your Quart app.

Firefox seems to only accept port 443.

Installation

Via Pip

pip install quart-doh

Then :

Generate a certificate and a private key :

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

doh-server --debug --cert [path]cert.pem --key [path]key.pem

doh-client --noverify

Via Docker

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

docker build -f Dockerfile -t quart-doh/doh-server .

docker run --rm -p 443:443 quart-doh/doh-server

Benchmark

Macbook Pro 2019 Processor 2,4 GHz Intel Core i5 Memory 8 GB 2133 MHz LPDDR3

apib -c 100 -d 60 @benchmark_get_url.txt

HTTP/1.1
Duration:             60.024 seconds
Attempted requests:   15757
Successful requests:  15757
Non-200 results:      0
Connections opened:   100
Socket errors:        0

Throughput:           262.511 requests/second
Average latency:      376.399 milliseconds
Minimum latency:      103.082 milliseconds
Maximum latency:      2846.580 milliseconds
Latency std. dev:     456.340 milliseconds
50% latency:          202.483 milliseconds
90% latency:          862.423 milliseconds
98% latency:          2044.469 milliseconds
99% latency:          2409.697 milliseconds

Client CPU average:    0%
Client CPU max:        0%
Client memory usage:    0%

Total bytes sent:      2.25 megabytes
Total bytes received:  5.08 megabytes
Send bandwidth:        0.30 megabits / second
Receive bandwidth:     0.68 megabits / second

Release files for quart-doh 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quart-doh 0.1.0
File Size Uploaded
quart-doh-0.1.0.tar.gz 6.9 kB Details

Release files / quart-doh-0.1.0.tar.gz

Download URL quart-doh-0.1.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cef0878737426a6a0a8f292fe51f06820a2ca447fd5b82bb58ac4fb78bf3e148
BLAKE2b-256 checksum
How to use checksums
896ae1e27910cf707c689d2587dd593817e1b29fb115bbe8ceed86a5f9f06ad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page