https://github.com/thearyanahmed/dot
DoT (DNS over TLS) proxy. https://developers.cloudflare.com/1.1.1.1/dns-over-tls . This repo is a POC.
https://github.com/thearyanahmed/dot
dns dns-over-tls golang
Last synced: 8 months ago
JSON representation
DoT (DNS over TLS) proxy. https://developers.cloudflare.com/1.1.1.1/dns-over-tls . This repo is a POC.
- Host: GitHub
- URL: https://github.com/thearyanahmed/dot
- Owner: thearyanahmed
- Created: 2021-07-17T20:21:55.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-17T20:46:18.000Z (about 4 years ago)
- Last Synced: 2025-01-03T03:41:56.758Z (9 months ago)
- Topics: dns, dns-over-tls, golang
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## DOT
DOT accepts conventional DNS requests and proxy it to DNS servers with [DNS over TLS (DoT)](https://en.wikipedia.org/wiki/DNS_over_TLS). DoT provides privacy and security improvements taking advantage of encrypted DNS traffic. For more information follow [RFC7858](https://datatracker.ietf.org/doc/html/rfc7858) and [RFC7626](https://datatracker.ietf.org/doc/html/rfc7626) [https://developers.cloudflare.com/1.1.1.1/dns-over-tls](https://developers.cloudflare.com/1.1.1.1/dns-over-tls)
.### Running with docker
```bash
docker run -itp 531:53 -p 531:53/UDP thearyanahmed/dot:1.0
```Set your nameserver to `127.0.0.1` in `/etc/resolv.conf`.
using dig to make the request
```bash
dig cloudflare.com @127.0.0.1 -p 531
```### Running locally
```
git clone git@github.com:thearyanahmed/dot.git
```cd into the project.
If you wish to change the env files make a copy of `.env.example` to `.env`
By default, the values are
```txt
UPSTREAM_TIMEOUT=2000ms
UPSTREAM_SERVER=1.1.1.1
UPSTREAM_PORT=853
ENABLED_TCP=true
ENABLED_UDP=true
```
To run the application,```
go run main.go
```**Note** Make sure your ports are available. It might not send of an error but will not print anything after priting `setting up dns handler`. I used docker to use a different port.
### Testing
**Note** -p $port must match
```
dig cloudflare.com @127.0.0.1 -p 531
```Thanks to [Shajal Ahamed](https://github.com/shajalahamedcse) for the idea.
Useful Links
- [RFC7858](https://datatracker.ietf.org/doc/html/rfc7858)
- [RFC7626](https://datatracker.ietf.org/doc/html/rfc7626)
- [Docker image](https://hub.docker.com/repository/docker/thearyanahmed/dot)
- [github.com/MatthewVance/stubby-docker](https://github.com/MatthewVance/stubby-docker)
- [github.com/miekg/dns](https://github.com/miekg/dns)
- [github.com/jonathanbeber/burrow](https://github.com/jonathanbeber/burrow)You should use it for learning purpose only.