Polipo — caching web proxy
I needed to map one port to another while tunneling over SSH. It's a common problem — you have a proxy on one port but need traffic from another port to r...
13 Oct 2023 · 2 min read

I needed to map one port to another while tunneling over SSH. It's a common problem — you have a proxy on one port but need traffic from another port to reach it. A colleague pointed me to Polipo, a small caching web proxy written in C.
What Polipo does
Polipo sits between your browser (or application) and the internet. It caches HTTP responses locally, so repeated requests don't hit the remote server. It's small, fast, and designed for personal or small-group use.
Polipo is a small and fast caching web proxy (a web cache, an HTTP proxy, a proxy server). While Polipo was designed to be used by one person or a small group of people, there is nothing that prevents it from being used by a larger group.
What made it interesting
Polipo uses HTTP/1.1 pipelining when it detects the remote server supports it. That means it sends multiple requests over a single connection without waiting for each response — even if the incoming requests arrive on separate connections. Most proxies at the time (like Squid) only used persistent connections, not true pipelining.
The trade-off
Polipo is no longer actively maintained. For modern use cases, tools like Squid, Nginx (as a reverse proxy), or even SSH's built-in port forwarding (-L and -R flags) are better supported options. But Polipo was a clean, minimal solution for its time, and understanding how it worked taught me a lot about HTTP connection management and caching strategies.
If you're curious, the source is still available on GitHub.
Ehsan Gazar helps software engineers take LLM and agent systems from demo to production. He writes about building LLM systems that hold up in production: evals, tracing, RAG, agent architecture and cost control. He teaches the Senior to Staff AI Engineer cohort on Maven, where engineers learn to design and defend these systems.
Forward Deployed AI Engineering: From Customer Problem to Production Value
A live Maven cohort for engineers: 10 live 90-minute sessions taking one AI engagement from customer problem to production, ending with eight artefacts and a working slice in your own repo.
January cohort starts Tue 12 Jan 2027, Tue & Thu 6:30pm London. Enrolling now, 20 seats, $1,800.
View the live cohort