๐ง From a Small Frustration to a Tiny but Powerful Proxy
A few weeks ago, I just needed a small proxy for testing local APIs.
Something that just works โ no heavy setup, no extra dependencies, no magic.
But as usual, once something works, developers canโt resist improving it ๐
Thatโs how simple-proxy-id was born.
Itโs a lightweight HTTP/HTTPS proxy for Node.js,
built with zero dependencies, yet still secure, fast, and flexible.
๐ง Why I Built It
While working with APIs, I noticed two extremes in most proxy libraries:
- Theyโre too flexible, which often leads to open-proxy abuse.
- Or too limited, making them hard to use in real server environments.
So I aimed for something in between โ secure, simple, but production-ready.
โ๏ธ Quick Example
import { createProxy } from "simple-proxy-id"
createProxy({
target: "https://jsonplaceholder.typicode.com",
port: 3000,
changeOrigin: true,
pathRewrite: { "^/api": "" },
})
Thatโs it โ your proxy is up and running.
No config files, no dependencies, no magic behavior.
โก Key Features
โ
Fixed target โ cannot be changed by external requests (prevents open proxy abuse)
โ
Path rewrite โ support for both pattern objects and custom functions
โ
Plugins โ CORS, daily rotating logger, brute-force attack detection
โ
Real IP detection โ supports Cloudflare Tunnel and X-Forwarded-For
โ
Zero dependency, high performance โ ~1,660 req/sec (p50: 52 ms, p99: 138 ms)
No frameworks, no dependencies โ just pure Node.js, connection pooling,
and a lot of small optimizations to make it perform well under load.
๐งฉ Why It Matters
The project started from a small frustration โ
but sometimes thatโs exactly where useful tools come from.
If you often deal with API testing, debugging, or quick proxy setups,
you might find this handy ๐
๐ GitHub: github.com/ibnushahraa/simple-proxy-id
๐ฆ NPM: npmjs.com/package/simple-proxy-id
Sometimes the best open-source projects donโt start with a plan โ
they start with one small problem you just couldnโt ignore.
Top comments (0)