Proxy Chain is a Node.js proxy server library published to npm as proxy-chain.
It is a single-package TypeScript ESM library providing an HTTP and HTTPS proxy with authentication, upstream proxy
chaining over HTTP and SOCKS, and CONNECT tunneling. This is a public Apache-2.0 repository, used by Apify Proxy,
Crawlee and by anyone routing Puppeteer or Playwright through an authenticated proxy.
- Only pnpm.
pnpm-lock.yamlis the lockfile, npm or yarn will diverge from it. - Node.js
>=20.11, seeenginesinpackage.json. CI runs 20, 22, 24 and 26. - ESM only, with
module: NodeNext. Every relative import ends in.js. src/index.tsis the entire public surface. Anything not re-exported there is internal.README.mdis the user-facing API contract. A public behaviour change needs a README update.- Common commands:
pnpm run buildpnpm run type-checkpnpm run lintpnpm testpnpm run test:unitpnpm run test:e2epnpm run test:dockerpnpm run local-proxy
- Lint rules live in eslint.config.mjs, which extends
@apify/eslint-config. Runpnpm run lint:fixto apply what is auto-fixable. - There is no formatter. Indentation is 4 spaces from .editorconfig.
pnpm run type-checktype-checkssrcandtestseparately, using different tsconfigs. Run it before finishing.
README.md is the source of truth for the public API, the Server options, the prepareRequestFunction
contract and the custom 590-599 status codes. test/README.md covers Docker-based testing and the Bun
compatibility matrix.