https://github.com/dvershinin/Nginx-DOH-Module
Simple Nginx module for serving DNS-over-HTTPS (DOH) requests.
https://github.com/dvershinin/Nginx-DOH-Module
Last synced: about 1 month ago
JSON representation
Simple Nginx module for serving DNS-over-HTTPS (DOH) requests.
- Host: GitHub
- URL: https://github.com/dvershinin/Nginx-DOH-Module
- Owner: dvershinin
- Fork: true (themagister/Nginx-DOH-Module)
- Created: 2020-01-15T21:54:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-26T19:52:13.000Z (about 4 years ago)
- Last Synced: 2026-05-19T13:50:17.674Z (3 months ago)
- Language: C
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nginx - Nginx-DOH-Module - Serve DNS-over-HTTPS responses straight from NGINX. 📦 (Networking and protocols)
README
Simple Nginx module for serving DNS-over-HTTPS (DOH) requests.
CAVEAT EMPTOR: This module is experimental, even though I have been using it successfully with both Firefox and Curl, there may be undiscovered bugs. Zone transfer is currently not officially supported.
Tested with Nginx versions:
1.16.1 (stable)
1.17.6
1.17.7 (mainline).
Instructions for building installing and using Nginx modules can be found at the links below.
dynamic: https://www.nginx.com/resources/wiki/extending/converting/#compiling-dynamic
static: https://www.nginx.com/resources/wiki/extending/compiling/
I have included a config file for both building as both a dynamic and static module.
This module is only allowed to be used in an http location block.
MODULE DIRECTIVES
doh: (takes no arguments) enable DOH at this location block, default upstream DNS server address is 127.0.0.1, default port is 53, and default timeout is 5 seconds.
doh_address: (takes 1 argument) sets the address of the upstream DNS server, can be either IPv4 or IPv6.
doh_port: (takes 1 argument) sets the port to contact the upstream DNS server on (appies to both TCP and UDP connections).
doh_timeout: (takes 1 argument) sets the timeout in seconds.
EXAMPLES
simplest use case with upstream DNS server listening on 127.0.0.1 on port 53:
```
location /dns-query {
doh;
}
```
set an upstream address of 127.0.2.1, a port of 5353, and a timeout of 2 seconds:
```
location /dns-query {
doh;
doh_address 127.0.2.1;
doh_port 5353;
doh_timeout 2;
}
```