Live data from Hacker News

Implement DNS in a Weekend

implement-dns.wizardzines.com

51–60 of 77 posts

Re: Implement DNS in a Weekend

#51
post #4

I'll dig up my old comment about how easy DNS is to work with using DNS4J: Message query = new Message(data); Header header = query.getHeader(); Record question = query.getQuestion(); Message response = new Message(query.getHeader().getID()); response.getHeader().setFlag(Flags.QR); response.addRecord(question, Section.QUESTION); Name name = question.getName(); int type = question.getType(); int dclass = question.getD…

Can't tell if this is sarcasm or not :)

On one hand, like all Java code, this is really really verbose. But on the other, it's not that complicated—every line seems like it corresponds to some part of the DNS spec.

Re: Implement DNS in a Weekend

#52
post #48
post #42

This is fabulous. It would be convenient if I didn't have to download the code to run it though - if it was in a GitHub repo it could provide links to hosted notebook services such as JupyterHub and Colab - then lazy people like myself could click those links to try out the notebooks in their browsers without downloading, unzipping and running Jupyter locally.

Can you copy the code into a hosted Jupyter?

Not OP but

> then lazy people like myself could click those links to try out the notebooks in their browsers without downloading, unzipping and running Jupyter locally.

Re: Implement DNS in a Weekend

#53

I love this. DNS is something that, if you're online and visiting websites or even sshing into boxes a lot of the time, you're using, unless of course you carry around a list of IP addresses like the olden times. It is one of the many things that underpin the modern web and we take it for granted.

I missed the “you’re using” at first, and was about to ask why on earth you keep maintaining host lists :P

Totally agree, and at the same time, it’s so painful that there’s a nice haiku —

    It’s not DNS
    There’s no way it’s DNS
    It was DNS

Re: Implement DNS in a Weekend

#54
Over time I've learned to stop taking people like Julia Evans for granted. Sometimes it feels like the Internet is an endless supply of brilliance and generosity and talent. But its not true! Not everyone creates, and not everyone who creates shares, and not everyone who shares shares freely. I feel overwhelmed by gratitude for Julia and (what I estimate to be) the mere ~100 creators in the world like her.

Re: Implement DNS in a Weekend

#55
post #51
post #4

I'll dig up my old comment about how easy DNS is to work with using DNS4J: Message query = new Message(data); Header header = query.getHeader(); Record question = query.getQuestion(); Message response = new Message(query.getHeader().getID()); response.getHeader().setFlag(Flags.QR); response.addRecord(question, Section.QUESTION); Name name = question.getName(); int type = question.getType(); int dclass = question.getD…

Can't tell if this is sarcasm or not :) On one hand, like all Java code, this is really really verbose. But on the other, it's not that complicated—every line seems like it corresponds to some part of the DNS spec.

It’s verbose but not complicated.

Verboseness doesn’t make something uneasy, it means you tell your IDE to autocomplete.

Re: Implement DNS in a Weekend

#56

I have a slightly off topic but related query to new HTTPS RR and SVCB record types of DNS. Will these records allow me to host sites without a reverse proxy since both records can include port info.

It is very well intentioned, but unlikely to actually see adoption outside of internal network service discovery maybe (where mDNS already does a good job).

Everything runs on 443 to avoid firewalls, moving services to new ports opens up the whackamole game of trying to find other unblocked ports and raises security implications.

Here is a more positive take for background on SVCB: https://www.isc.org/docs/2022-webinar-dns-scvb.pdf

Re: Implement DNS in a Weekend

#58
post #37

Earlier quoted context omitted.

Setting the pi-hole as your DNS server in your router would not work? TV should then use this DNS server after getting an IP-address via DHCP.

The Pi-hole isn't hosted on my local network, but on my Tailscale network because it's running on a VPS. My router can't run Tailscale, so that's not possible.

If you upgrade to ZeroTier you can get it running on OpenWRT and MikroTik routers https://help.mikrotik.com/docs/display/ROS/ZeroTier

Re: Implement DNS in a Weekend

#59

I love this. DNS is something that, if you're online and visiting websites or even sshing into boxes a lot of the time, you're using, unless of course you carry around a list of IP addresses like the olden times. It is one of the many things that underpin the modern web and we take it for granted.

I missed the “you’re using” at first, and was about to ask why on earth you keep maintaining host lists :P Totally agree, and at the same time, it’s so painful that there’s a nice haiku — It’s not DNS There’s no way it’s DNS It was DNS

Man, it hurts how hours of struggle and frustration can be summed up in a haiku. Beautiful.

Re: Implement DNS in a Weekend

#60

I love this. DNS is something that, if you're online and visiting websites or even sshing into boxes a lot of the time, you're using, unless of course you carry around a list of IP addresses like the olden times. It is one of the many things that underpin the modern web and we take it for granted.

I missed the “you’re using” at first, and was about to ask why on earth you keep maintaining host lists :P Totally agree, and at the same time, it’s so painful that there’s a nice haiku — It’s not DNS There’s no way it’s DNS It was DNS

> It was DNS

To be fair, sometimes it's BGP.

Post reply on HN