Ronit Pandaronit.dev·Jul 14, 2024Building a simple http server to query dns serverWe are almost at the end, in this blog we will be building a simple http server which will resolve our DNS queries by querying the underlying UDP server we built, providing us with an easy to use interface. Honestly we are just going to setup a bare ...Discuss·31 readsBuilding a simple DNS server from scratch with NodeJS and Typescriptbuilding your own dns
Ronit Pandaronit.dev·Jul 14, 2024Building the DNS cacheBefore jumping into the code for the cache, let's first breakdown what exactly what we need from the cache class And also how are we going to cater to all those use-cases Requirements set answers to all question names and record types individually t...DiscussBuilding a simple DNS server from scratch with NodeJS and Typescriptcache
Ronit Pandaronit.dev·Jul 14, 2024Testing the recursive resolverThis will be very straightforward. So without any delay head over to src/udp-server.test.ts Initial setup Add all required imports Start up a udpSocket on udp4 TEST_PORT & TEST_HOST signify the host and port on which our actual udp server is runni...DiscussBuilding a simple DNS server from scratch with NodeJS and Typescriptunit testing
Ronit Pandaronit.dev·Jul 14, 2024Building the recursive resolverWe have already explored the outline of our UDP server, now time comes to actually build the resolver which will resolve DNS queries. f you don't have the codebase yet:https://github.com/rtpa25/dns-server For this before jumping into code, let's unde...DiscussBuilding a simple DNS server from scratch with NodeJS and TypescriptRecursion
Ronit Pandaronit.dev·Jul 14, 2024Finally building out the DNS serverNow that our parser and builder is ready and tested, let's move on to building the UDP server that is actually going to resolve DNS queries for us if you don't have the codebase yet:https://github.com/rtpa25/dns-server In this blog we will see and un...DiscussBuilding a simple DNS server from scratch with NodeJS and TypescriptUDP
Ronit Pandaronit.dev·Jul 14, 2024Setting up a testing suite with jestHey welcome back to the series, let's now setup a testing suite with jest in our codebase, to test all the classes we have written in the last a few blogs. if you don't have the codebase yet:https://github.com/rtpa25/dns-server Install required deve...DiscussBuilding a simple DNS server from scratch with NodeJS and Typescriptdns
Ronit Pandaronit.dev·Jul 14, 2024Writing a dns packet parserHey guys welcome back to the series, in this blog let's understand and build a parser class that can Without further a do let's straight move on to src/message/parser.tsif you don't have the codebase yet:https://github.com/rtpa25/dns-server lemme pas...DiscussBuilding a simple DNS server from scratch with NodeJS and Typescriptdns
Ronit Pandaronit.dev·Jul 14, 2024Writing a dns packet builderHonestly, if you are a web engineer who hasn't done much low-level work in your career just like me, following the upcoming blogs might be a bit challenging. That's because we will be working with binary buffer data, understanding each bit and byte. ...DiscussBuilding a simple DNS server from scratch with NodeJS and Typescriptdns
Ronit Pandaronit.dev·Jul 14, 2024Understanding the DNS protocolIn this blog, we will explore the DNS protocol, understand DNS packets, and guide you on building a DNS packet parser and builder in TypeScript. Typically, DNS packets are sent using UDP transport and are limited to 512 bytes. DNS is convenient becau...DiscussBuilding a simple DNS server from scratch with NodeJS and Typescriptdns
Ronit Pandaronit.dev·Jul 14, 2024Introduction to building your own DNS serverHi everyone! welcome to the second blog series on my engineering directory where we will learn how DNS works on an high level, and try to build a basic implementation of the same without using any library using NodeJS and Typescript. Before building ...Discuss·58 readsBuilding a simple DNS server from scratch with NodeJS and Typescriptbuilding your own dns