Overview
A network toolkit implementing core networking protocols. Built UDP & ICMP Ping and Traceroute using raw sockets, plus an HTTP Proxy & Web Server with persistent caching.
Why it’s interesting
Built toolkit directly on Network and Transport Layers of the OSI model (Layers 3 & 4) bypassing high-level Application, Presentation & Session layer abstractions. Built both UDP & ICMP implementations of ping and traceroute which manually built, packed, serialised and checksum verified packets. Designed and built multi-client TCP web-server which handles full Request-Response cycle and HTTP status-code reporting. Project also contained a proxy server with persistent, hierarchical caching.
Key Technical Points
- TCP Webserver: Custom server built using sockets that’s designed to serve local files and return RFC compliant HTTP status codes.
- Forward Proxy: A stateful socket-based forward proxy with local hierarchical caching to reduce latency on repeat requests.
- Raw Sockets: Web-tools (ping and traceroute) both used SOCK_RAW to bypass high-level API abstractions.
- Manual Protocol Implementation: Manually implemented ping and traceroute over both UDP & ICMP. Required manually defining header and payload in structs before serialising to binary. Used ones’ complement as a checksum verifier.
Tech Stack
Language: Python
Protocols: UDP, ICMP, HTTP
Platform: Linux