News for hackers. Stuff that matters.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by davidu on Friday September 16, 2016 @03:05PM (#12516475)
DNSCrypt (https://dnscrypt.org/) would be more elegant here (DTLS also okay) and is in-band wrapper for DNS. It's what TLS is for HTTP but for DNS and keeps things UDP.

Worth pointing out, this is not a google project, it just uses Google's DNS over HTTP endpoint.

We have one we made at https://www.openresolve.com/

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by pjf on Friday September 16, 2016 @04:40PM (#12517174)
Thanks for all your comments. Below I put quick replies to some of them:

1/ I hope to update the project to use QUIC soon, so it will use encrypted UDP to fetch DNS data from Google Public DNS. It is somehow similar to the DNS over DTLS idea, developed under IETF dprive WG.

2/ dingo does not need to resolve dns.google.com. Providing the server IP address is enough (IPv4 or IPv6, make sure it is close to your location). dingo verifies the server certificate to make sure we talk to Google. It can even "spoof" the TLS SNI string to avoid HTTPS firewalls, too (by default it asks for www.google.com, which is pretty benign).

3/ Last but not least, it's just my first non-trivial Golang project - thanks for all your suggestions! :)

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by nickodell on Friday September 16, 2016 @07:22PM (#12518103)
It seems like this includes up to 500 bytes of padding in a request. Is there a reason for that?
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by pjf on Friday September 16, 2016 @07:27PM (#12518129)
Yes, the random padding (which is optional) is to counter-measure possible side-channel privacy attacks that could infer the domain name from the packet sizes.

The Google documentation explains that (look for "random_padding") at https://developers.google.com/speed/public-dns/docs/dns-over...

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by textmode on Friday September 16, 2016 @10:19PM (#12518773)
"It can even \"spoof\" the TLS SNI string to avoid HTTPS firewalls..."

Are you confirming SNI is being used for censorship?

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by clinta on Saturday September 17, 2016 @09:10AM (#12520335)
Plenty of content blockers support blocking domains based on SNI. Here's just a couple of examples from a quick google search.

https://wiki.untangle.com/index.php/Web_Filter#HTTPS_Options

http://www.watchguard.com/help/docs/wsm/xtm_11/en-us/content...

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by NetStrikeForce on Wednesday September 21, 2016 @08:55AM (#12547707)
If someone is doing DPI their best bet to know where are you connecting to is to look at the host in SNI, but if you're in a corporate environment with an explicit proxy, your computer would be sending a "CONNECT hostname.tld" in plain text anyway :)
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by wyattjoh on Friday September 16, 2016 @01:53PM (#12515880)
The use of `go run` here makes adopting this very hard. The benefit of using Go for projects (in my experience) is that you can build for multiple OS/Arch super, super easy. I'd thin that having uploaded artefacts would be the first thing most people do when releasing Go code into the wild that is meant to be consumed by someone just wanting to run the program.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by pjf on Monday September 19, 2016 @10:24AM (#12531668)
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by pjf on Monday September 19, 2016 @06:09PM (#12535182)
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by clinta on Saturday September 17, 2016 @09:44AM (#12520449)
It's also quite easy to set up Travis-CI to build your project and push binaries to github releases on tagged pushes. Pretty much the first thing I do with every go project.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by icholy on Friday September 16, 2016 @01:59PM (#12515923)
go get github.com/pforemski/dingo
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by gouggoug on Friday September 16, 2016 @02:52PM (#12516364)
I think the point wyattjoh was making is that having to install the go toolchain is hindering adoption and that giving downloadable binaries that you could run directly, like `./dingo` would be nicer.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by zalmoxes on Friday September 16, 2016 @04:50PM (#12517237)
Thats a great point. As a Go developer I always try to make sure that there's a linux and binary for my small projects released on github. I'm surprised more Go devs don't do this. The toolchain makes it very easy to update releases. You can also use ldflags to set the current git revision and branch into the project.

Here's an example release.sh I have in most of my projects https://github.com/micromdm/scep/blob/master/cmd/scepclient/...

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by eropple on Friday September 16, 2016 @05:41PM (#12517568)
The literal only selling point for Go, from my perspective--as a software developer, platform engineer, and someone willing to put up with others' Go applications but under no circumstances could be paid enough to write it or fight with its ecosystem--is a statically linked binary deployable. It's not an unmitigated good, of course, for obvious and dependency-related reasons. But it's the only reason to consider a Go tool at all. Otherwise, I might as well be using a Python dependency. Or Ruby or Java.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by j3097736 on Friday September 16, 2016 @04:50PM (#12517233)
But then you would have to rely on supposedly authentic binaries to run a supposedly secure service.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by 0xdeadbeefbabe on Friday September 16, 2016 @06:06PM (#12517713)
Oh I get it. You finished auditing the linux kernel and can now comment on hn?
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by eropple on Friday September 16, 2016 @05:00PM (#12517309)
Cryptographic signatures exist.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by allendoerfer on Friday September 16, 2016 @01:46PM (#12515828)
Encryption is nice, but does it have to be the overhead of HTTP? What would be a sensible alternative protocol?
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by zokier on Friday September 16, 2016 @02:28PM (#12516157)
DNSCrypt or RFC7858 (dprive) are probably closest equivalents.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by ademarre on Friday September 16, 2016 @02:44PM (#12516294)
I suppose it could also be implemented with DTLS [0] over UDP [1]. (Checking Wikipedia...) A 2013 paper [2] published some vulnerabilities; mostly implementation flaws, but it raised some questions about the core spec as well.

However you implement it, encrypting DNS probably has it's place, but it doesn't make a whole lot of sense for most applications.

[0] https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Secur...

[1] https://tools.ietf.org/html/rfc6347

[2] http://www.isg.rhul.ac.uk/~kp/dtls.pdf

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by zokier on Friday September 16, 2016 @02:57PM (#12516410)
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by ShakataGaNai on Friday September 16, 2016 @03:54PM (#12516826)
Am I the only one who took a quick look at this and went "How can this DNS be 'secure' if it has to use normal DNS to look up dns.google.com?"
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by advisedwang on Friday September 16, 2016 @04:17PM (#12517025)
Because you validate the certificate presented so that you know the endpoint is really Google.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by x0rx0r on Friday September 16, 2016 @07:46PM (#12518209)
This is very cool. If you compile it into a go executable and run it with the -dbg 3 option it shows all the lookup information for the clients.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by yegle on Friday September 16, 2016 @06:36PM (#12517880)
My friend also wrote a similar tool in Go. This tool uses Taobao's API to detect your external IP address so edns will not be fixed string.

https://github.com/ayanamist/gdns-go

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by vemv on Friday September 16, 2016 @03:01PM (#12516444)
What problem does this project solve?

It's not immediately obvious what the thing does from the description.

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by dexterdog on Friday September 16, 2016 @05:18PM (#12517429)
When you are out and about with your laptop you are usually making your DNS calls to the local router which many view as a big privacy concern. Even if you use something like google's 8.8.8.8 and 8.8.4.4 public DNS servers as your defaults the traffic is easily sniffable.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by icebraining on Friday September 16, 2016 @10:13PM (#12518756)
When you connect to any site, your browser sends the domain in clear-text (even for HTTPS - see SNI). The only way to avoid this is to use a VPN, but then you can route regular DNS over that too.
Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by sciurus on Friday September 16, 2016 @04:09PM (#12516969)
The description sounds pretty clear to me.

"A caching DNS proxy for the Google DNS-over-HTTPS. It effectively encrypts all your DNS traffic."

https://developers.google.com/speed/public-dns/docs/dns-over...

Re:Show HN: dingo - a Google DNS-over-HTTPS caching proxy in Go by jzelinskie on Friday September 16, 2016 @06:08PM (#12517726)
This code needs a pass through gofmt, among many of the other Go linting technologies.