Personal Project

Dreamproxy

A lightweight reverse proxy and static file server written from scratch in Go as an exploration of HTTP parsing, TCP handling, and production-minded server design.

Dreamproxy is a systems-learning project with real product constraints: explicit protocol handling, predictable routing behavior, and a clean path toward production hardening. Every feature is built to expose internals, not hide them.

Project Snapshot

Status

In active development

Role

Systems design and implementation

Stack

Go, raw TCP sockets, custom HTTP parsing, file I/O

Updated

May 2026

Feature Matrix

Custom HTTP Parser

Full ownership of request lifecycle

Manual parsing of start-line, headers, and body framing

Done

Reverse Proxy Routing

Backend service composition

Forwarding logic with upstream target mapping

Done

Static File Serving

Unified edge-like behavior

Path resolution, MIME detection, and fallback handling

Done

Caching Layer

Lower upstream pressure

In-memory key strategy + invalidation policy

Planned

Progress & Roadmap

v0.2

100%
  • HTTP parser core
  • Basic proxy forwarding
  • Static file pipeline

v0.3

65%
  • Connection handling hardening
  • Error boundaries
  • Structured logging upgrades

v1.0

25%
  • Caching module
  • Compression support
  • Graceful shutdown

Technical Challenges

Protocol correctness

Problem: Small parsing mistakes can break interoperability across clients.

Solution: Implemented strict parsing phases with explicit malformed-request handling.

Tradeoff: More verbose parsing code and larger test surface.

Proxy transparency

Problem: Forwarding requires preserving request intent while avoiding header corruption.

Solution: Defined a predictable header pass-through strategy and controlled overrides.

Tradeoff: Requires careful maintenance as features expand.

Failure containment

Problem: Connection-level failures can cascade if not isolated.

Solution: Scoped errors per request path with structured logging around boundaries.

Tradeoff: Additional complexity in handler lifecycle management.

Performance & Reliability

Hot Path

Single-pass parsing stages

reduces ambiguous state transitions during request handling

Operational Safety

Explicit error boundaries

prevents failures from leaking across independent requests

Scalability Direction

Cache + compression roadmap

targets lower latency and reduced upstream load

Lessons & Next Bets

  • Owning protocol internals strengthens system-design decisions across all backend work.
  • Predictability beats cleverness in proxy and networking code paths.
  • Next focus: mature connection lifecycle, caching, and benchmark-driven optimization.