• Stars
    star
    131
  • Rank 275,867 (Top 6 %)
  • Language
    Go
  • License
    Mozilla Public Li...
  • Created over 6 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Minimal DNS-Over-HTTPS Server

Minimal DNS-Over-HTTPS Server

Stefan Arentz, April 2018

This is a tiny and minimal implementation of draft-ietf-doh-dns-over-https.

By default it forwards incoming DNS requests to 127.0.0.1:53. This means you need to have a DNS server running on the machine where you run this service. Personally I like apt-get install pdns-recursor. You can also use the -upstream argument to use a different dns server and for example use the brand new CloudFare/APNIC global DNS service with -upstream 1.1.1.1:53.

To use this in Firefox, you will have to deploy this to a HTTPS server. I use Caddy, with a config like this:

my.server.com {
    root /var/www
    gzip
    tls [email protected]

    proxy /dns-query 127.0.0.1:9091 {
          transparent
    }
}

I then run the server in a tmux session simply with go run main.go -verbose. This is obviously not production ready, it is an experiment / exploration.

To get this going in Firefox, you need the following:

  • Firefox Nightly (Or possibly Firefox 60 Beta or later, not sure)
  • Set network.trr.url to your https://my.server.com/dns-query
  • Set network.trr.mode to something higher than 1 (See TRR Preferences)

I had to restart Firefox before it picked up these settings. You should see something like this appear:

2018/03/31 13:47:31 POST Request for <golang.org./IN/A> (592.183µs)
2018/03/31 13:47:31 POST Request for <golang.org./IN/AAAA> (2.513745ms)
2018/03/31 13:47:31 POST Request for <golang.org./IN/A> (812.055µs)
2018/03/31 13:47:31 POST Request for <golang.org./IN/AAAA> (787.912µs)
2018/03/31 13:47:48 POST Request for <blog.golang.org./IN/AAAA> (206.335515ms)
2018/03/31 13:47:49 POST Request for <blog.golang.org./IN/A> (237.966346ms)

Enjoy.

More Repositories

1

ios-openssl

Port of OpenSSL for iOS
Objective-C
393
star
2

dovecot-xaps-daemon

Go
156
star
3

osx-10.9

OS X 10.9 Public Sources
C
99
star
4

iphone-twitter

iPhone Twitter Framework
Objective-C
90
star
5

dovecot-xaps-plugin

C
88
star
6

iphone-bookreader

Simple EPUB Book Reader for the iPhone
C
81
star
7

SadMacScreenSaver

Sad Mac Screen Saver
Objective-C
78
star
8

arduino-aws-hsm

Arduino AWS HSM
Arduino
62
star
9

iphone-bitly

iPhone bit.ly API
Objective-C
38
star
10

cocoa-utils

Misc utility classes for Cocoa
Objective-C
38
star
11

gohawk

Server-Side Hawk Implementation in Go
Go
37
star
12

ewm

Emulated Woz Machine - Apple ][+ Emulator
C
37
star
13

usbmux-proxy

Proxy to run on OS X that allows direct communications with iPhone or iPod Touch devices
C++
35
star
14

iphone-experiments

Code experiments to discover the iPhone APIs
Objective-C
26
star
15

clj-angularjs-recipes

Example Angular.js and Clojure web application
JavaScript
26
star
16

departures-board

Clojure Transit Tracker
JavaScript
20
star
17

krusader

Ken's Rather Useless Symbolic Assembly Development Environment for the Replica 1
Assembly
16
star
18

fxos-repl

Firefox OS REPL
Python
16
star
19

iphone-animation

iPhone Animation Framework
Objective-C
15
star
20

pythoncodeanalysis

Python Code Analysis
Python
11
star
21

jsonfeed

Minimal JSON Feed Package for Go
Go
9
star
22

iphone-transitions

Small category for UIViewController that allows arbitrary present and dismiss transitions.
Objective-C
8
star
23

MozillaScreenSaver

Mozilla Screen Saver
Objective-C
7
star
24

cocoa-xml

Cocoa XML Utilities
Objective-C
7
star
25

moz-syncserver

Mozilla Sync Server
Python
6
star
26

mijia-hub

Mijia Hub
Go
6
star
27

iphone-beacon

Objective-C
5
star
28

xliff

Go XLIFF Abstraction
Go
5
star
29

FirefoxHomeDeux

Firefox Home Deux
5
star
30

Security-55471

Apple's Security-55471 Source Dump
C
5
star
31

py-deb

Python package to create debian packages programatically
5
star
32

PuzzleScreenSaver

Puzzle Screen Saver
Objective-C
5
star
33

cocoa-crypto

Simple wrapper for crypto primitives like MessageDigest and HMAC
Objective-C
5
star
34

gigahub

GigaHub Scripts
Python
4
star
35

dotfiles

Shell
3
star
36

StackOverflow-28777670-TrackingArea

Swift
3
star
37

iphone-player

Simple Media Player
Objective-C
3
star
38

ios-jpake

J-PAKE Wrapper for iOS
Objective-C
3
star
39

config.emacs

Stefan's Emacs Configuration
Emacs Lisp
3
star
40

hello-pi-zero

Cross compiling Go to run on the Raspberry Pi Zero
Go
3
star
41

gocrypto

Go Crypto
Go
3
star
42

LongBranch

iPhone app to show TTC stop information
Objective-C
3
star
43

mod_mediarss

Apache 2.0 module to generate directory indexes in media rss format
C
3
star
44

moz-csp-dashboard

CSP Report Dashboard
JavaScript
3
star
45

TTCRoutes

iPhone Application that shows all TTC Streetcar Routes and Stops
Objective-C
3
star
46

LocalizationTest

Swift
3
star
47

StackOverflow

Code for my StackOverflow Answers
Objective-C
3
star
48

ios-jpake-test

iOS J-PAKE Test
C
2
star
49

firefox-ios-builder

Swift
2
star
50

pic32hacks

PIC32 Hacks and Experiments
C
2
star
51

mqs

Mini Queue Service
2
star
52

aoc

Advent of Code
Python
2
star
53

cocoa-atom

Objective-C
2
star
54

caddy-requestinfo

Caddy Request Info Plugin
Go
2
star
55

block-advertisers

Mute Twitter Advertisers
Python
2
star
56

dswg

Distributed Services With Go - Book Code
Go
2
star
57

hue-motion-events

Hue Motion Events Recorder
Python
2
star
58

WebKitExperiments

Swift
2
star
59

tiny2313hacks-003-adc

Tiny2313 Hacks #003 - ADC
2
star
60

electronics

Stefan's Electronics Projects
C
2
star
61

deno-playground

Deno Playground
TypeScript
2
star
62

dotfilesold

Shell
2
star
63

moz-csp-collector

CSP Dashboard
Go
2
star
64

b2g-python

Python for B2G
Python
2
star
65

ios-utils

iOS Utilities
Objective-C
2
star
66

bcrypt_pbkdf

Package bcrypt_pbkdf implements bcrypt_pbkdf(3) from OpenBSD.
Go
2
star
67

exercism

Exercism Solutions (Spoiler Alert - Don't Peek)
Rust
2
star
68

cocoa-wsf-client

Cocoa client for web services exposed with the Polar Rose Web Service Foundation
Objective-C
2
star
69

moz-syncapi

REST API for Firefox Sync
Go
2
star
70

spdy-server

SPDY Server
Java
2
star
71

clojure-experiments

My Clojure Experiments
2
star
72

jpake-test

JPAKE Test Client
Python
2
star
73

ios-hacks

Random iOS Hacks
Python
1
star
74

alexa-top-million

Alexa Top Million Sites
1
star
75

env

Somewhat easier access to environment variables
Go
1
star
76

sensor-firmware

ESP32/DHT22 Sensor Firmware
Python
1
star
77

deployments

Deployments Are Cool
Go
1
star
78

config.nvim

My Neovim Config
Lua
1
star
79

moz-websecbugs

Mozilla Web Security Bugs Dashboard
JavaScript
1
star
80

LaunchBarActions

LaunchBar Actions
JavaScript
1
star
81

ios-minimal-persona

Minimal app for Persona integration testing
Objective-C
1
star
82

satk

Python
1
star
83

disable-all-retweets

Disable All Retweets
Python
1
star
84

moz-tokenserver

Token Server
Go
1
star
85

License-Breaker

BeOS Screensaver that outputs the disassembly of the kernel
C++
1
star
86

moz-go-persona

Go Persona Client
Go
1
star
87

shttpd

Static HTTPD
HTML
1
star
88

ifmetrics

Interface Metrics for InfluxDB
Go
1
star
89

gohacks

Random Go Hacks & Experiments
Go
1
star
90

cocoa-rss

Objective-C
1
star
91

TwitterHacksWebExtension

Twitter Hacks Web Extension
JavaScript
1
star
92

expander

Web Service to Expand Short URLs
Clojure
1
star
93

delete-junk

Delete Junk Email
Go
1
star
94

tumblr2twitter

Tumbler to Twitter
Go
1
star
95

dovecot-empty-plugin

C
1
star
96

lambda-firefox-ios-builds

Lambda-Powered Micro-Site that shows Firefox iOS Build Status
HTML
1
star
97

moz-mockmyid-api

API for MockMyID
Go
1
star
98

fxios

Swift
1
star
99

proxxxxxxy

Proxxxxxxy - IPv6 HTTP Proxy
Go
1
star
100

moz-middleman

Session Broker
Python
1
star