{"id":22489193,"url":"https://github.com/unjs/httpxy","last_synced_at":"2025-06-10T22:41:53.888Z","repository":{"id":189761297,"uuid":"681253780","full_name":"unjs/httpxy","owner":"unjs","description":"🔀 A Full-Featured HTTP and WebSocket Proxy for Node.js","archived":false,"fork":false,"pushed_at":"2023-12-28T02:10:00.000Z","size":178,"stargazers_count":136,"open_issues_count":12,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-12-28T23:47:09.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-08-21T15:53:01.000Z","updated_at":"2023-12-31T17:22:43.176Z","dependencies_parsed_at":"2023-08-21T17:25:41.160Z","dependency_job_id":"2ccb5200-8ebb-4b95-9816-8224ad069f7d","html_url":"https://github.com/unjs/httpxy","commit_stats":null,"previous_names":["unjs/httpxy"],"tags_count":5,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs%2Fhttpxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs%2Fhttpxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs%2Fhttpxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unjs%2Fhttpxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unjs","download_url":"https://codeload.github.com/unjs/httpxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228500221,"owners_count":17930020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T17:19:23.804Z","updated_at":"2025-06-10T22:41:53.801Z","avatar_url":"https://github.com/unjs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# 🔀 httpxy\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![Codecov][codecov-src]][codecov-href]\n\nA Full-Featured HTTP and WebSocket Proxy for Node.js forked from [http-party/node-http-proxy](https://github.com/http-party/node-http-proxy) with modern Typescript rewrite.\n\n## Usage\n\nInstall package:\n\n```sh\n# npm\nnpm install httpxy\n\n# yarn\nyarn add httpxy\n\n# pnpm\npnpm install httpxy\n```\n\nCreate proxy:\n\n```ts\nimport { createServer } from \"node:http\";\n\nimport { createProxyServer } from \"httpxy\";\n\nconst proxy = createProxyServer({});\n\nconst server = createServer(async (req, res) =\u003e {\n  try {\n    await proxy.web(req, res, {\n      target: address /* address of your proxy server here */,\n    });\n  } catch (error) {\n    console.error(error);\n    res.statusCode = 500;\n    res.end(\"Proxy error: \" + error.toString());\n  }\n});\n\nserver.listen(3000, () =\u003e {\n  console.log(\"Proxy is listening on http://localhost:3000\");\n});\n```\n\nCheckout [http-party/node-http-proxy](https://github.com/http-party/node-http-proxy) for more options and examples (note: `followRedirects` is not supported).\n\n## Development\n\n- Clone this repository\n- Install latest LTS version of [Node.js](https://nodejs.org/en/)\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Run interactive tests using `pnpm dev`\n\n## License\n\nMade with 💛\n\nPublished under [MIT License](./LICENSE).\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/httpxy?style=flat\u0026colorA=18181B\u0026colorB=F0DB4F\n[npm-version-href]: https://npmjs.com/package/httpxy\n[npm-downloads-src]: https://img.shields.io/npm/dm/httpxy?style=flat\u0026colorA=18181B\u0026colorB=F0DB4F\n[npm-downloads-href]: https://npmjs.com/package/httpxy\n[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/httpxy/main?style=flat\u0026colorA=18181B\u0026colorB=F0DB4F\n[codecov-href]: https://codecov.io/gh/unjs/httpxy\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/httpxy?style=flat\u0026colorA=18181B\u0026colorB=F0DB4F\n[bundle-href]: https://bundlephobia.com/result?p=httpxy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funjs%2Fhttpxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funjs%2Fhttpxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funjs%2Fhttpxy/lists"}