All Projects → EmilHernvall → Dnsguide

EmilHernvall / Dnsguide

A guide to writing a DNS Server from scratch in Rust

Projects that are alternatives of or similar to Dnsguide

Message Io
Event-driven message library for building network applications easy and fast.
Stars: ✭ 321 (-85.58%)
Mutual labels:  tcp, udp, network-programming
node-dns
🌐 DNS Server and Client Implementation in Pure JavaScript with no dependencies.
Stars: ✭ 390 (-82.48%)
Mutual labels:  tcp, udp, dns-server
protocol
Easy protocol definitions in Rust
Stars: ✭ 151 (-93.22%)
Mutual labels:  tcp, udp, network-programming
ebook
Third edition of the Computer Networking: Principles, Protocols and Practice ebook
Stars: ✭ 64 (-97.12%)
Mutual labels:  dns, tcp, udp
http-connection-lifecycle
Complete and detailed explanation of HTTP connection lifecycle
Stars: ✭ 43 (-98.07%)
Mutual labels:  dns, tcp, udp
EdgeAdmin
CDN & WAF集群管理系统。
Stars: ✭ 199 (-91.06%)
Mutual labels:  dns, tcp, udp
packet
📦 Send network packets over a TCP or UDP connection.
Stars: ✭ 68 (-96.95%)
Mutual labels:  tcp, udp, network-programming
Nps
一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
Stars: ✭ 19,537 (+777.67%)
Mutual labels:  dns, tcp, udp
Libnet
A portable framework for low-level network packet construction
Stars: ✭ 640 (-71.25%)
Mutual labels:  dns, tcp, udp
Pihole Unbound
Guide to setup Unbound recursive DNS resolver with Pi-Hole. With additional configs for speed and security!! 🚀🔒
Stars: ✭ 165 (-92.59%)
Mutual labels:  dns, dns-server
Pbscan
Faster and more efficient stateless SYN scanner and banner grabber due to userland TCP/IP stack usage.
Stars: ✭ 122 (-94.52%)
Mutual labels:  tcp, udp
Async Sockets Cpp
Simple thread-based asynchronous TCP & UDP Socket classes in C++.
Stars: ✭ 127 (-94.29%)
Mutual labels:  tcp, udp
Go Netstat
A netstat implementation written in Go
Stars: ✭ 121 (-94.56%)
Mutual labels:  tcp, udp
Gobetween
☁️ Modern & minimalistic load balancer for the Сloud era
Stars: ✭ 1,631 (-26.73%)
Mutual labels:  tcp, udp
Socket
Non-blocking socket and TLS functionality for PHP based on Amp.
Stars: ✭ 122 (-94.52%)
Mutual labels:  tcp, udp
Goproxy
🔥 Proxy is a high performance HTTP(S) proxies, SOCKS5 proxies,WEBSOCKET, TCP, UDP proxy server implemented by golang. Now, it supports chain-style proxies,nat forwarding in different lan,TCP/UDP port forwarding, SSH forwarding.Proxy是golang实现的高性能http,https,websocket,tcp,socks5代理服务器,支持内网穿透,链式代理,通讯加密,智能HTTP,SOCKS5代理,黑白名单,限速,限流量,限连接数,跨平台,KCP支持,认证API。
Stars: ✭ 11,334 (+409.16%)
Mutual labels:  tcp, udp
Knot
A mirrored repository
Stars: ✭ 138 (-93.8%)
Mutual labels:  dns, dns-server
Dowse
The Awareness Hub for the Internet of Things
Stars: ✭ 139 (-93.76%)
Mutual labels:  dns, internet
Fi6s
IPv6 network scanner designed to be fast
Stars: ✭ 116 (-94.79%)
Mutual labels:  tcp, udp
Knetstat
Simple kernel module to inspect socket options
Stars: ✭ 134 (-93.98%)
Mutual labels:  tcp, udp

Building a DNS server in Rust

The internet has a rich conceptual foundation, with many exciting ideas that enable it to function as we know it. One of the really cool ones is DNS. Before it was invented, everyone on the internet - which admittedly wasn't that many at that stage - relied on a shared file called HOSTS.TXT, maintained by the Stanford Research Institute. This file was synchronized manually through FTP, and as the number of hosts grew, so did the rate of change and the unfeasibility of the system. In 1983, Paul Mockapetris set out to find a long term solution to the problem and went on to design and implement DNS. It's a testament to his genius that his creation has been able to scale from a few thousand computers to the Internet as we know it today.

With the combined goal of gaining a deep understanding of DNS, of doing something interesting with Rust, and of scratching some of my own itches, I originally set out to implement my own DNS server. This document is not a truthful chronicle of that journey, but rather an idealized version of it, without all the detours I ended up taking. We'll gradually implement a full DNS server, starting from first principles.

Samples

Each chapter has a corresponding sample which contains the full code up to that point in the guide, named sample1.rs through sample5.rs. These can be run using, for first chapter, cargo run --example sample1.

Revision History

  • June 2020 - Fixed a security vulnerability in read_qname which allowed for a malicious packet to trigger an infinite loop. Modernized the code to conform to current rust practices, and fixed various ugly inefficiencies.
  • July 2016 - Initial version
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].