Skip to content

Instantly share code, notes, and snippets.

@onokatio
Last active April 4, 2018 03:40
Show Gist options
  • Save onokatio/de64e1ec113ade4a467a513fcd3e18b8 to your computer and use it in GitHub Desktop.
Save onokatio/de64e1ec113ade4a467a513fcd3e18b8 to your computer and use it in GitHub Desktop.
Cloudflareが1.1.1.1で超高性能DNS始めたし、いっちょ俺のパソコンもDNS over HTTPSしてみる ref: https://qiita.com/onokatio/items/42fb4a2811600680591b
$ wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-amd64.tgz
$ tar xvf cloudflared-stable-linux-amd64.tgz
$ sudo mv ./cloudflared /usr/bin/
$ sudo cloudflared proxy-dns
INFO[0000] Adding DNS upstream url="https://cloudflare-dns.com/.well-known/dns-query"
INFO[0000] Starting metrics server addr="127.0.0.1:49312"
INFO[0000] Starting DNS over HTTPS proxy server addr="dns://localhost:53"
$ dig google.com @127.0.0.1
; <<>> DiG 9.12.1 <<>> google.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1493
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1536
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 152 IN A 216.58.214.14
;; Query time: 131 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: 月 4月 02 23:34:56 JST 2018
;; MSG SIZE rcvd: 65
$ sudo systemctl start proxydns.service
$ sudo systemctl enable proxydns.service #自動起動させたい場合のみ
[Unit]
Description=Proxy dns server over https
Before=network.target
[Service]
Type=simple
ExecStart=/usr/bin/cloudflared proxy-dns
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment