Simple-proxy-id — A tiny yet secure proxy for Node.js (zero dependencies)

🧠 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, de…


This content originally appeared on DEV Community and was authored by Muhammad Syarwani

🧠 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.


This content originally appeared on DEV Community and was authored by Muhammad Syarwani


Print Share Comment Cite Upload Translate Updates
APA

Muhammad Syarwani | Sciencx (2025-10-18T02:04:06+00:00) Simple-proxy-id — A tiny yet secure proxy for Node.js (zero dependencies). Retrieved from https://www.scien.cx/2025/10/18/simple-proxy-id-a-tiny-yet-secure-proxy-for-node-js-zero-dependencies/

MLA
" » Simple-proxy-id — A tiny yet secure proxy for Node.js (zero dependencies)." Muhammad Syarwani | Sciencx - Saturday October 18, 2025, https://www.scien.cx/2025/10/18/simple-proxy-id-a-tiny-yet-secure-proxy-for-node-js-zero-dependencies/
HARVARD
Muhammad Syarwani | Sciencx Saturday October 18, 2025 » Simple-proxy-id — A tiny yet secure proxy for Node.js (zero dependencies)., viewed ,<https://www.scien.cx/2025/10/18/simple-proxy-id-a-tiny-yet-secure-proxy-for-node-js-zero-dependencies/>
VANCOUVER
Muhammad Syarwani | Sciencx - » Simple-proxy-id — A tiny yet secure proxy for Node.js (zero dependencies). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/10/18/simple-proxy-id-a-tiny-yet-secure-proxy-for-node-js-zero-dependencies/
CHICAGO
" » Simple-proxy-id — A tiny yet secure proxy for Node.js (zero dependencies)." Muhammad Syarwani | Sciencx - Accessed . https://www.scien.cx/2025/10/18/simple-proxy-id-a-tiny-yet-secure-proxy-for-node-js-zero-dependencies/
IEEE
" » Simple-proxy-id — A tiny yet secure proxy for Node.js (zero dependencies)." Muhammad Syarwani | Sciencx [Online]. Available: https://www.scien.cx/2025/10/18/simple-proxy-id-a-tiny-yet-secure-proxy-for-node-js-zero-dependencies/. [Accessed: ]
rf:citation
» Simple-proxy-id — A tiny yet secure proxy for Node.js (zero dependencies) | Muhammad Syarwani | Sciencx | https://www.scien.cx/2025/10/18/simple-proxy-id-a-tiny-yet-secure-proxy-for-node-js-zero-dependencies/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.