Live data from Hacker News

HTML over DNS: Serving Blog Content over DNS

jacobkiers.net

1–10 of 77 posts

Re: HTML over DNS: Serving Blog Content over DNS

#2
As someone who has an obsession with base64 encoding (as exemplified by my poorly written shell scripting here: https://miscdotgeek.com/curlytp-every-web-server-is-a-dead-d... ) I love this. It makes me wonder if some CSS and maybe even a highly compressed image or two could be added.

Re: HTML over DNS: Serving Blog Content over DNS

#3
What's the point though? I can think maybe of reduced latency, but then you usually have the DNS already cached locally. And that takes me to a second point, won't you run into problems delivering content updates, given that clients will most likely cache DNS entries?

Re: HTML over DNS: Serving Blog Content over DNS

#4
post #3

What's the point though? I can think maybe of reduced latency, but then you usually have the DNS already cached locally. And that takes me to a second point, won't you run into problems delivering content updates, given that clients will most likely cache DNS entries?

Probably "because it's there".

Re: HTML over DNS: Serving Blog Content over DNS

#6
Corollary is, spyware can use DNS to exfiltrate data [0]. Or, send out client-side metrics with cleverly drafted DNS requests [1], or use it as a 3p-cookie replacement [2].

[0] https://unit42.paloaltonetworks.com/dns-tunneling-how-dns-ca...

[1] https://github.com/Jigsaw-Code/choir (disclosure: I co-develop hard-forks of two other related Jigsaw-Code projects)

[2] http://dnscookie.com/

Re: HTML over DNS: Serving Blog Content over DNS

#7
Looks more like HTML via HTTP, specifically DoH.

    const dohServer = "https://cloudflare-dns.com/dns-query?ct=application/dns-json&type=TXT&name=";
    const baseDomain = "hod.experiments.jacobkiers.net";
About 12 years ago I experimented with HTML over UDP DNS by modifying dnstxt from djbdns to output a MIME header. I could store tiny web pages, i.e., hyperlinks, in a zone file and serve them with tinydns. (This was before the size of DNS packets ballooned with adoption of EDNS.)

Re: HTML over DNS: Serving Blog Content over DNS

#8
post #3

What's the point though? I can think maybe of reduced latency, but then you usually have the DNS already cached locally. And that takes me to a second point, won't you run into problems delivering content updates, given that clients will most likely cache DNS entries?

Highly distributed global CDN for free. You can use a short TTL, though there are lots of misbehaving DNS servers around cache timeouts. "Fetch with DoH" kinda ruins the party, but browsers can't do UDP or non-HTTP TCP.

Re: HTML over DNS: Serving Blog Content over DNS

#9
post #3

What's the point though? I can think maybe of reduced latency, but then you usually have the DNS already cached locally. And that takes me to a second point, won't you run into problems delivering content updates, given that clients will most likely cache DNS entries?

In my mind this is a neat proof-of-concept that shows how you can serve content through some absurd method (in this case serving HTML over DNS). It may not have "a point" beyond just being an example of what's possible!

Re: HTML over DNS: Serving Blog Content over DNS

#10
Author here: I made it as a proof of concept, just because I could.

I used DoH because to the best of my knowledge it's not possible to open raw sockets from the browser. Otherwise I'd have done that.

I don't think there's any practical use. And I did not intend it to have any.

Post reply on HN