Building Lens: A Transparent Network Introspection Tool in Rust
One of the most frustrating parts of debugging modern applications is understanding what actually happens after a request leaves your code.
A simple API call might involve:
Client
↓
HTTP API
↓
Authentication
↓
PostgreSQL
↓
Redis
↓
External APIs
By the time something fails, you're jumping between logs, terminals, database consoles, and packet captures trying to reconstruct the request.
I wanted a better developer experience.
Introducing Lens
Lens is an open-source Rust project that visualizes application traffic during local development.
Instead of manually piecing together interactions, Lens builds a live traffic map showing how requests move between applications, databases, and services.
The project is designed around a transparent proxy architecture, allowing traffic to be inspected without modifying application code.
Current Features
- Live terminal flow visualization
- HTTP/1.1 protocol support
- PostgreSQL protocol decoding
- Automatic secret redaction
- Modular Cargo workspace
- Cross-platform architecture (Linux, macOS, Windows)
- Plugin-oriented design
Architecture
The project is split into multiple Rust crates, separating concerns such as:
- Core runtime
- Proxy engine
- Protocol parsing
- Terminal UI
- Storage
- Plugins
I've also documented the architecture with ADRs, testing strategy, security considerations, and performance budgets before expanding implementation.
Why Rust?
Rust felt like the right choice because Lens needs:
- predictable performance
- memory safety
- asynchronous networking
- cross-platform support
- strong type safety for protocol parsing
Tokio provides the async runtime, while the workspace structure keeps the codebase modular as additional protocols are added.
Current Status
The project has reached the stage where the architecture is largely in place, and I'm now focused on implementing the remaining runtime components and protocol support.
Areas currently being worked on include:
- HTTP/2
- Redis protocol parsing
- Additional database protocols
- Integration testing
- Plugin SDK
- Windows support
Looking for Contributions
If you've built networking tools, proxies, protocol parsers, or terminal applications in Rust, I'd genuinely appreciate some contributions on the architecture and implementation.
If the project sounds interesting, contributors are always welcome—especially anyone interested in async networking, protocol parsing, or systems programming.
GitHub:
https://github.com/dpsyfik/lens
I'm happy to answer any questions or discuss the design decisions behind the project.
Top comments (0)