{"_id":"httpxy","_rev":"4487204","name":"httpxy","description":"A full-featured HTTP proxy for Node.js.","dist-tags":{"latest":"0.5.0"},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"time":{"modified":"2026-04-09T01:15:40.000Z","created":"2023-08-21T13:12:52.799Z","0.5.0":"2026-03-26T10:35:04.154Z","0.4.0":"2026-03-25T20:48:12.213Z","0.3.1":"2026-02-18T19:15:28.384Z","0.3.0":"2026-02-12T22:53:31.287Z","0.2.2":"2026-02-11T17:23:11.308Z","0.2.1":"2026-02-10T20:28:10.565Z","0.2.0":"2026-02-09T10:59:40.797Z","0.1.7":"2025-01-27T17:17:10.313Z","0.1.6":"2025-01-14T13:25:36.951Z","0.1.5":"2023-09-08T23:30:11.046Z","0.1.4":"2023-08-26T19:38:03.010Z","0.1.3":"2023-08-26T19:36:48.764Z","0.1.2":"2023-08-23T01:30:42.093Z","0.1.1":"2023-08-23T01:17:56.624Z","0.1.0":"2023-08-21T15:53:28.639Z","0.0.0":"2023-08-21T13:12:52.799Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"versions":{"0.5.0":{"name":"httpxy","version":"0.5.0","description":"A full-featured HTTP proxy for Node.js.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"type":"module","sideEffects":false,"types":"./dist/index.d.mts","exports":{".":"./dist/index.mjs"},"scripts":{"build":"obuild","dev":"vitest","lint":"oxlint . && oxfmt --check","fmt":"oxlint . --fix && oxfmt","prepack":"pnpm run build","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm typecheck && vitest run --coverage","typecheck":"tsgo --noEmit"},"devDependencies":{"@types/async":"^3.2.25","@types/concat-stream":"^2.0.3","@types/express":"^5.0.6","@types/node":"^25.5.0","@types/semver":"^7.7.1","@types/sse":"^0.0.0","@types/ws":"^8.18.1","@typescript/native-preview":"^7.0.0-dev.20260325.1","@vitest/coverage-v8":"^4.1.1","async":"^3.2.6","changelogen":"^0.6.2","concat-stream":"^2.0.0","eslint-config-unjs":"^0.6.2","expect.js":"^0.3.1","obuild":"^0.4.32","ofetch":"^1.5.1","oxfmt":"^0.42.0","oxlint":"^1.57.0","semver":"^7.7.4","socket.io":"^4.8.3","socket.io-client":"^4.8.3","sse":"^0.0.8","typescript":"^6.0.2","undici":"^7.24.6","vitest":"^4.1.1","ws":"^8.20.0"},"packageManager":"pnpm@10.33.0","gitHead":"4e1db50fb65313675434cfe56aed2927ebf0aed5","_id":"httpxy@0.5.0","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"shasum":"a9c53543760dee498611827a464e56e14639c0d0","size":16458,"noattachment":false,"key":"/httpxy/-/httpxy-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.5.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.5.0_1774521304012_0.08873896920924351"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-26T10:35:04.154Z","publish_time":1774521304154,"_source_registry_name":"default","_cnpm_publish_time":1774521304154},"0.4.0":{"name":"httpxy","version":"0.4.0","description":"A full-featured HTTP proxy for Node.js.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"type":"module","sideEffects":false,"types":"./dist/index.d.mts","exports":{".":"./dist/index.mjs"},"scripts":{"build":"obuild","dev":"vitest","lint":"oxlint . && oxfmt --check","fmt":"oxlint . --fix && oxfmt","prepack":"pnpm run build","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm typecheck && vitest run --coverage","typecheck":"tsgo --noEmit"},"devDependencies":{"@types/async":"^3.2.25","@types/concat-stream":"^2.0.3","@types/express":"^5.0.6","@types/node":"^25.5.0","@types/semver":"^7.7.1","@types/sse":"^0.0.0","@types/ws":"^8.18.1","@typescript/native-preview":"^7.0.0-dev.20260325.1","@vitest/coverage-v8":"^4.1.1","async":"^3.2.6","changelogen":"^0.6.2","concat-stream":"^2.0.0","eslint-config-unjs":"^0.6.2","expect.js":"^0.3.1","obuild":"^0.4.32","ofetch":"^1.5.1","oxfmt":"^0.42.0","oxlint":"^1.57.0","semver":"^7.7.4","socket.io":"^4.8.3","socket.io-client":"^4.8.3","sse":"^0.0.8","typescript":"^6.0.2","undici":"^7.24.6","vitest":"^4.1.1","ws":"^8.20.0"},"packageManager":"pnpm@10.33.0","gitHead":"d54346c95f341bb060844e0f641e84fffec8c172","_id":"httpxy@0.4.0","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"shasum":"af133bedc1413044f5701e145e75c5e65ee4614e","size":16103,"noattachment":false,"key":"/httpxy/-/httpxy-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.4.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.4.0_1774471692052_0.9795325598020106"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-25T20:48:12.213Z","publish_time":1774471692213,"_source_registry_name":"default","_cnpm_publish_time":1774471692213},"0.3.1":{"name":"httpxy","version":"0.3.1","description":"A full-featured HTTP proxy for Node.js.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"build":"unbuild","dev":"vitest","lint":"oxlint . && oxfmt --check","fmt":"oxlint . --fix && oxfmt","prepack":"pnpm run build","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm typecheck && vitest run --coverage","typecheck":"tsgo --noEmit"},"devDependencies":{"@types/async":"^3.2.25","@types/concat-stream":"^2.0.3","@types/express":"^5.0.6","@types/node":"^25.2.3","@types/semver":"^7.7.1","@types/sse":"^0.0.0","@types/ws":"^8.18.1","@typescript/native-preview":"^7.0.0-dev.20260218.1","@vitest/coverage-v8":"^4.0.18","async":"^3.2.6","changelogen":"^0.6.2","concat-stream":"^2.0.0","eslint-config-unjs":"^0.6.2","expect.js":"^0.3.1","ofetch":"^1.5.1","oxfmt":"^0.33.0","oxlint":"^1.48.0","semver":"^7.7.4","socket.io":"^4.8.3","socket.io-client":"^4.8.3","sse":"^0.0.8","typescript":"^5.9.3","unbuild":"^3.6.1","vitest":"^4.0.18","ws":"^8.19.0"},"packageManager":"pnpm@10.30.0","gitHead":"4b03756d3e7c1ad1ae9874475bdb56d2ea7e6dba","_id":"httpxy@0.3.1","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"shasum":"da1bb1a4a26cb44d7835a9297c845a0e06372083","size":23094,"noattachment":false,"key":"/httpxy/-/httpxy-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.3.1.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.3.1_1771442128229_0.3076782195959007"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-18T19:15:28.384Z","publish_time":1771442128384,"_source_registry_name":"default","_cnpm_publish_time":1771442128384},"0.3.0":{"name":"httpxy","version":"0.3.0","description":"A full-featured HTTP proxy for Node.js.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"build":"unbuild","dev":"vitest","lint":"oxlint . && oxfmt --check","fmt":"oxlint . --fix && oxfmt","prepack":"pnpm run build","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm typecheck && vitest run --coverage","typecheck":"tsgo --noEmit"},"devDependencies":{"@types/async":"^3.2.25","@types/concat-stream":"^2.0.3","@types/express":"^5.0.6","@types/node":"^25.2.3","@types/semver":"^7.7.1","@types/sse":"^0.0.0","@types/ws":"^8.18.1","@typescript/native-preview":"^7.0.0-dev.20260212.1","@vitest/coverage-v8":"^4.0.18","async":"^3.2.6","changelogen":"^0.6.2","concat-stream":"^2.0.0","eslint-config-unjs":"^0.6.2","expect.js":"^0.3.1","ofetch":"^1.5.1","oxfmt":"^0.32.0","oxlint":"^1.47.0","semver":"^7.7.4","socket.io":"^4.8.3","socket.io-client":"^4.8.3","sse":"^0.0.8","typescript":"^5.9.3","unbuild":"^3.6.1","vitest":"^4.0.18","ws":"^8.19.0"},"packageManager":"pnpm@10.29.3","gitHead":"00d8214933cf7acd7050cd857933dbcc21e10538","_id":"httpxy@0.3.0","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"shasum":"0980aba390b4ee4b5aa9554e3deeacfa6df5f85a","size":20018,"noattachment":false,"key":"/httpxy/-/httpxy-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.3.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.3.0_1770936811134_0.9753523155225199"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-12T22:53:31.287Z","publish_time":1770936811287,"_source_registry_name":"default","_cnpm_publish_time":1770936811287},"0.2.2":{"name":"httpxy","version":"0.2.2","description":"A full-featured HTTP proxy for Node.js.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"oxlint . && oxfmt --check src test","lint:fix":"oxlint . --fix && oxfmt src test","prepack":"pnpm run build","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsgo --noEmit"},"devDependencies":{"@types/async":"^3.2.25","@types/concat-stream":"^2.0.3","@types/express":"^5.0.6","@types/node":"^25.2.3","@types/sse":"^0.0.0","@types/ws":"^8.18.1","@typescript/native-preview":"^7.0.0-dev.20260210.1","@vitest/coverage-v8":"^4.0.18","async":"^3.2.6","changelogen":"^0.6.2","concat-stream":"^2.0.0","eslint-config-unjs":"^0.6.2","expect.js":"^0.3.1","jiti":"^2.6.1","listhen":"^1.9.0","ofetch":"^1.5.1","oxfmt":"^0.31.0","oxlint":"^1.46.0","semver":"^7.7.4","socket.io":"^4.8.3","socket.io-client":"^4.8.3","sse":"^0.0.8","typescript":"^5.9.3","unbuild":"^3.6.1","vitest":"^4.0.18","ws":"^8.19.0"},"packageManager":"pnpm@10.29.2","gitHead":"32d2f0ec36d8231d28a42c8a6c76de9cc9e4347d","_id":"httpxy@0.2.2","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"shasum":"1603165cfd12087f2039c4a8532ce61eab5d84e5","size":9433,"noattachment":false,"key":"/httpxy/-/httpxy-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.2.2.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.2.2_1770830591151_0.24191515993676682"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-11T17:23:11.308Z","publish_time":1770830591308,"_source_registry_name":"default","_cnpm_publish_time":1770830591308},"0.2.1":{"name":"httpxy","version":"0.2.1","description":"A full-featured HTTP proxy for Node.js.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"oxlint . && oxfmt --check src test","lint:fix":"oxlint . --fix && oxfmt src test","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsgo --noEmit"},"devDependencies":{"@types/async":"^3.2.25","@types/concat-stream":"^2.0.3","@types/express":"^5.0.6","@types/node":"^25.2.3","@types/sse":"^0.0.0","@types/ws":"^8.18.1","@typescript/native-preview":"^7.0.0-dev.20260210.1","@vitest/coverage-v8":"^4.0.18","async":"^3.2.6","changelogen":"^0.6.2","concat-stream":"^2.0.0","eslint-config-unjs":"^0.6.2","expect.js":"^0.3.1","jiti":"^2.6.1","listhen":"^1.9.0","ofetch":"^1.5.1","oxfmt":"^0.31.0","oxlint":"^1.46.0","semver":"^7.7.4","socket.io":"^4.8.3","socket.io-client":"^4.8.3","sse":"^0.0.8","typescript":"^5.9.3","unbuild":"^3.6.1","vitest":"^4.0.18","ws":"^8.19.0"},"packageManager":"pnpm@10.29.2","gitHead":"d0b8b4b4b6771feaa57380e68c0f0f785ee16ba3","_id":"httpxy@0.2.1","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"shasum":"2ca50930c9824afb888936bbccc8c20dcbb64bf9","size":2548,"noattachment":false,"key":"/httpxy/-/httpxy-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.2.1.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.2.1_1770755290429_0.9708143314979283"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-10T20:28:10.565Z","publish_time":1770755290565,"_source_registry_name":"default","_cnpm_publish_time":1770755290565},"0.2.0":{"name":"httpxy","version":"0.2.0","description":"A full-featured HTTP proxy for Node.js.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"oxlint . && oxfmt --check src test","lint:fix":"oxlint . --fix && oxfmt src test","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsgo --noEmit"},"devDependencies":{"@types/async":"^3.2.25","@types/concat-stream":"^2.0.3","@types/node":"^25.2.2","@types/sse":"^0.0.0","@types/ws":"^8.18.1","@typescript/native-preview":"7.0.0-dev.20260209.1","@vitest/coverage-v8":"^4.0.18","async":"^3.2.6","changelogen":"^0.6.2","concat-stream":"^2.0.0","eslint-config-unjs":"^0.6.2","expect.js":"^0.3.1","jiti":"^2.6.1","listhen":"^1.9.0","ofetch":"^1.5.1","oxfmt":"^0.28.0","oxlint":"^1.43.0","semver":"^7.7.4","socket.io":"^4.8.3","socket.io-client":"^4.8.3","sse":"^0.0.8","typescript":"^5.9.3","unbuild":"^3.6.1","vitest":"^4.0.18","ws":"^8.19.0"},"packageManager":"pnpm@10.29.2","gitHead":"707db4310f10e76c4a811210fd0f85c506da804e","_id":"httpxy@0.2.0","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"shasum":"518bd571609c3c0e01359a89dc0903929d4bb2c3","size":9401,"noattachment":false,"key":"/httpxy/-/httpxy-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.2.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.2.0_1770634780640_0.5301783977546053"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-09T10:59:40.797Z","publish_time":1770634780797,"_source_registry_name":"default","_cnpm_publish_time":1770634780797},"0.1.7":{"name":"httpxy","version":"0.1.7","description":"A full-featured HTTP proxy for Node.js.","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"eslint --cache . && prettier -c src test","lint:fix":"eslint --cache . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsc --noEmit"},"devDependencies":{"@types/node":"^22.10.10","@vitest/coverage-v8":"^3.0.4","changelogen":"^0.5.7","eslint":"^9.19.0","eslint-config-unjs":"^0.4.2","jiti":"^2.4.2","listhen":"^1.9.0","ofetch":"^1.4.1","prettier":"^3.4.2","typescript":"^5.7.3","unbuild":"^3.3.1","vitest":"^3.0.4"},"packageManager":"pnpm@9.15.4","_id":"httpxy@0.1.7","gitHead":"7e0577dd16690409c89c1155082813c0c0847dd6","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"22.13.0","_npmVersion":"10.9.2","dist":{"shasum":"02d02e57eda10e8b5c0e3f9f10860e3d7a5991a4","size":8808,"noattachment":false,"key":"/httpxy/-/httpxy-0.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.1.7.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.1.7_1737998230085_0.9027160939467931"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-27T17:17:10.313Z","publish_time":1737998230313,"_source_registry_name":"default","_cnpm_publish_time":1737998230313},"0.1.6":{"name":"httpxy","version":"0.1.6","description":"A full-featured HTTP proxy for Node.js.","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"eslint --cache . && prettier -c src test","lint:fix":"eslint --cache . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsc --noEmit"},"devDependencies":{"@types/node":"^22.10.6","@vitest/coverage-v8":"^2.1.8","changelogen":"^0.5.7","eslint":"^9.18.0","eslint-config-unjs":"^0.4.2","jiti":"^2.4.2","listhen":"^1.9.0","ofetch":"^1.4.1","prettier":"^3.4.2","typescript":"^5.7.3","unbuild":"^3.3.1","vitest":"^2.1.8"},"packageManager":"pnpm@9.15.4","_id":"httpxy@0.1.6","gitHead":"0a09b6790815c76b8f4db73b51740f41de22e032","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"shasum":"74a11e435bbcd6ff712763d6de9372659f7f08f8","size":8802,"noattachment":false,"key":"/httpxy/-/httpxy-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.1.6.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/httpxy_0.1.6_1736861136796_0.6436513696014221"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-14T13:25:36.951Z","publish_time":1736861136951,"_source_registry_name":"default","_cnpm_publish_time":1736861136951},"0.1.5":{"name":"httpxy","version":"0.1.5","description":"A full-featured HTTP proxy for Node.js.","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsc --noEmit"},"devDependencies":{"@types/node":"^20.6.0","@vitest/coverage-v8":"^0.34.4","changelogen":"^0.5.5","eslint":"^8.49.0","eslint-config-unjs":"^0.2.1","jiti":"^1.20.0","listhen":"^1.5.0","ofetch":"^1.3.3","prettier":"^3.0.3","typescript":"^5.2.2","unbuild":"^2.0.0","vitest":"^0.34.4"},"packageManager":"pnpm@8.7.4","gitHead":"8532771ba5a24f8478a46d8899af6d7986799e6b","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_id":"httpxy@0.1.5","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"fd2401206e0b5d919aeda25e967ece0f1a6c8569","size":8803,"noattachment":false,"key":"/httpxy/-/httpxy-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.1.5.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/httpxy_0.1.5_1694215810735_0.48814113106153423"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-08T23:30:11.046Z","publish_time":1694215811046,"_source_registry_name":"default","_cnpm_publish_time":1694215811046},"0.1.4":{"name":"httpxy","version":"0.1.4","description":"A full-featured HTTP proxy for Node.js.","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsc --noEmit"},"devDependencies":{"@types/node":"^20.5.6","@vitest/coverage-v8":"^0.34.3","changelogen":"^0.5.5","eslint":"^8.48.0","eslint-config-unjs":"^0.2.1","jiti":"^1.19.3","listhen":"^1.4.0","ofetch":"^1.3.3","prettier":"^3.0.2","typescript":"^5.2.2","unbuild":"^2.0.0","vitest":"^0.34.3"},"packageManager":"pnpm@8.6.12","gitHead":"f8cde141ece42e5a8d243a2963d6644ba3f83212","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_id":"httpxy@0.1.4","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"78e4d7c81a4dea03e313278e9474430cf3931c93","size":8784,"noattachment":false,"key":"/httpxy/-/httpxy-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.1.4.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/httpxy_0.1.4_1693078682768_0.7139686020071805"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-26T19:38:03.010Z","publish_time":1693078683010,"_source_registry_name":"default","_cnpm_publish_time":1693078683010},"0.1.3":{"name":"httpxy","version":"0.1.3","description":"A full-featured HTTP proxy for Node.js.","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsc --noEmit"},"devDependencies":{"@types/node":"^20.5.6","@vitest/coverage-v8":"^0.34.3","changelogen":"^0.5.5","eslint":"^8.48.0","eslint-config-unjs":"^0.2.1","jiti":"^1.19.3","listhen":"^1.4.0","ofetch":"^1.3.3","prettier":"^3.0.2","typescript":"^5.2.2","unbuild":"^2.0.0","vitest":"^0.34.3"},"packageManager":"pnpm@8.6.12","gitHead":"13dd227a8e607ab57b2f1056fe3d8f7d82d7612a","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_id":"httpxy@0.1.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"7a89a596f3afd291f92b79f48e40d38887f60b40","size":8787,"noattachment":false,"key":"/httpxy/-/httpxy-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.1.3.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/httpxy_0.1.3_1693078608483_0.42865160901695054"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-26T19:36:48.764Z","publish_time":1693078608764,"_source_registry_name":"default","_cnpm_publish_time":1693078608764},"0.1.2":{"name":"httpxy","version":"0.1.2","description":"A full-featured HTTP proxy for Node.js.","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsc --noEmit"},"devDependencies":{"@types/node":"^20.5.3","@vitest/coverage-v8":"^0.34.2","changelogen":"^0.5.5","eslint":"^8.47.0","eslint-config-unjs":"^0.2.1","jiti":"^1.19.3","listhen":"^1.4.0","ofetch":"^1.2.1","prettier":"^3.0.2","typescript":"^5.1.6","unbuild":"^2.0.0","vitest":"^0.34.2"},"packageManager":"pnpm@8.6.12","gitHead":"b6bd4a8cea4afae8eae16f06397785da08823179","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_id":"httpxy@0.1.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"7ece5be85ba4cfb34c6ad73189e2dd35f93b987e","size":8789,"noattachment":false,"key":"/httpxy/-/httpxy-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.1.2.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/httpxy_0.1.2_1692754241883_0.7606290879941737"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-23T01:30:42.093Z","publish_time":1692754242093,"_source_registry_name":"default","_cnpm_publish_time":1692754242093},"0.1.1":{"name":"httpxy","version":"0.1.1","description":"A full-featured HTTP proxy for Node.js.","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsc --noEmit"},"devDependencies":{"@types/node":"^20.5.3","@vitest/coverage-v8":"^0.34.2","changelogen":"^0.5.5","eslint":"^8.47.0","eslint-config-unjs":"^0.2.1","jiti":"^1.19.3","listhen":"^1.4.0","ofetch":"^1.2.1","prettier":"^3.0.2","typescript":"^5.1.6","unbuild":"^2.0.0","vitest":"^0.34.2"},"packageManager":"pnpm@8.6.12","gitHead":"c3fa9ce80a16c3d7a5b93a7012325bd0129aa444","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_id":"httpxy@0.1.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"d3d3a05835fa1b1f12e9214e5c946b2c75c9116b","size":8766,"noattachment":false,"key":"/httpxy/-/httpxy-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.1.1.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/httpxy_0.1.1_1692753476442_0.9447857335111078"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-23T01:17:56.624Z","publish_time":1692753476624,"_source_registry_name":"default","_cnpm_publish_time":1692753476624},"0.1.0":{"name":"httpxy","version":"0.1.0","description":"A full-featured HTTP proxy for Node.js.","repository":{"type":"git","url":"git+https://github.com/unjs/httpxy.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest","play":"jiti ./playground","lint":"eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test","lint:fix":"eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w","prepack":"pnpm run build","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && pnpm test:types && vitest run --coverage","test:types":"tsc --noEmit"},"devDependencies":{"@types/node":"^20.5.1","@vitest/coverage-v8":"^0.34.1","changelogen":"^0.5.4","eslint":"^8.46.0","eslint-config-unjs":"^0.2.1","jiti":"^1.19.3","listhen":"^1.3.0","ofetch":"^1.1.1","prettier":"^3.0.1","typescript":"^5.1.6","unbuild":"^2.0.0-rc.0","vitest":"^0.34.1"},"packageManager":"pnpm@8.6.12","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"homepage":"https://github.com/unjs/httpxy#readme","_id":"httpxy@0.1.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"shasum":"e461f3e2a3723568d87aacd5e1e077243fffecf0","size":8541,"noattachment":false,"key":"/httpxy/-/httpxy-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.1.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/httpxy_0.1.0_1692633208449_0.6682559856526464"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-21T15:53:28.639Z","publish_time":1692633208639,"_source_registry_name":"default","_cnpm_publish_time":1692633208639},"0.0.0":{"name":"httpxy","version":"0.0.0","_id":"httpxy@0.0.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"shasum":"d4458b585fc3d7986e34a9e6e8cae5d625fbca9a","size":133,"noattachment":false,"key":"/httpxy/-/httpxy-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/httpxy/download/httpxy-0.0.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/httpxy_0.0.0_1692623572652_0.20681013168714468"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-21T13:12:52.799Z","publish_time":1692623572799,"_source_registry_name":"default","_cnpm_publish_time":1692623572799}},"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\n\n## Proxy Fetch\n\n`proxyFetch` is a proxy utility with web standard (`Request`/`Response`) interfaces. It forwards requests to a specific server address (TCP host/port or Unix socket), bypassing the URL's hostname.\n\n```ts\nimport { proxyFetch } from \"httpxy\";\n\n// TCP — using a URL string\nconst res = await proxyFetch(\"http://127.0.0.1:3000\", \"http://example.com/api/data\");\nconsole.log(await res.json());\n\n// Unix socket — using a URL string\nconst res2 = await proxyFetch(\"unix:/tmp/app.sock\", \"http://localhost/health\");\nconsole.log(await res2.text());\n\n// Or use an object for more control\nconst res3 = await proxyFetch({ host: \"127.0.0.1\", port: 3000 }, \"http://example.com/api/data\");\n\n// Using a Request object\nconst req = new Request(\"http://example.com/api/data\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\" },\n  body: JSON.stringify({ key: \"value\" }),\n});\nconst res4 = await proxyFetch(\"http://127.0.0.1:3000\", req);\n\n// Using a URL string with RequestInit\nconst res5 = await proxyFetch(\"http://127.0.0.1:3000\", \"http://example.com/api/data\", {\n  method: \"PUT\",\n  headers: { Authorization: \"Bearer token\" },\n  body: JSON.stringify({ updated: true }),\n});\n```\n\nIt accepts the same `input` and `init` arguments as the global `fetch`, including `Request` objects and streaming bodies, and returns a standard `Response`. Redirects are handled manually by default.\n\n## Proxy Upgrade\n\n`proxyUpgrade` is a standalone WebSocket upgrade proxy. It forwards `upgrade` requests to a target server without needing a `ProxyServer` instance — the WebSocket counterpart to `proxyFetch`.\n\n```ts\nimport { createServer } from \"node:http\";\nimport { proxyUpgrade } from \"httpxy\";\n\nconst server = createServer((req, res) => {\n  // Handle regular HTTP requests...\n});\n\nserver.on(\"upgrade\", (req, socket, head) => {\n  proxyUpgrade(\"http://127.0.0.1:8080\", req, socket, head);\n});\n\nserver.listen(3000);\n```\n\nIt accepts the same `addr` formats as `proxyFetch` (`\"http://host:port\"`, `\"unix:/path\"`, or `{ host, port }` / `{ socketPath }`), and returns a `Promise<Socket>` that resolves with the upstream proxy socket once the WebSocket connection is established.\n\n```ts\n// With options\nserver.on(\"upgrade\", (req, socket, head) => {\n  proxyUpgrade({ host: \"127.0.0.1\", port: 8080 }, req, socket, head, {\n    // changeOrigin: true, // rewrite Host header\n    // xfwd: false, // disable x-forwarded-* headers (enabled by default)\n  });\n});\n```\n\n## Proxy Server\n\n> [!NOTE]\n> Proxy server was originally forked from [http-party/node-http-proxy](https://github.com/http-party/node-http-proxy).\n\nCreate proxy:\n\n```ts\nimport { createServer } from \"node:http\";\nimport { createProxyServer } from \"httpxy\";\n\nconst proxy = createProxyServer({});\n\nconst server = createServer(async (req, res) => {\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, () => {\n  console.log(\"Proxy is listening on http://localhost:3000\");\n});\n```\n\n## Options\n\n| Option                  | Type                                   | Default    | Description                                                                 |\n| ----------------------- | -------------------------------------- | ---------- | --------------------------------------------------------------------------- |\n| `target`                | `string \\| URL \\| ProxyTargetDetailed` | —          | Target server URL                                                           |\n| `forward`               | `string \\| URL`                        | —          | Forward server URL (pipes request without the target's response)            |\n| `agent`                 | `http.Agent \\| false`                  | keep-alive | Shared keep-alive agent by default. Set `false` to disable connection reuse |\n| `ssl`                   | `https.ServerOptions`                  | —          | Object passed to `https.createServer()`                                     |\n| `ws`                    | `boolean`                              | `false`    | Enable WebSocket proxying                                                   |\n| `xfwd`                  | `boolean`                              | `false`    | Add `x-forwarded-*` headers                                                 |\n| `secure`                | `boolean`                              | —          | Verify SSL certificates                                                     |\n| `toProxy`               | `boolean`                              | `false`    | Pass absolute URL as path (proxy-to-proxy)                                  |\n| `prependPath`           | `boolean`                              | `true`     | Prepend the target's path to the proxy path                                 |\n| `ignorePath`            | `boolean`                              | `false`    | Ignore the incoming request path                                            |\n| `localAddress`          | `string`                               | —          | Local interface to bind for outgoing connections                            |\n| `changeOrigin`          | `boolean`                              | `false`    | Change the `Host` header to match the target URL                            |\n| `preserveHeaderKeyCase` | `boolean`                              | `false`    | Keep original letter case of response header keys                           |\n| `auth`                  | `string`                               | —          | Basic authentication (`'user:password'`) for `Authorization` header         |\n| `hostRewrite`           | `string`                               | —          | Rewrite the `Location` hostname on redirects (301/302/307/308)              |\n| `autoRewrite`           | `boolean`                              | `false`    | Rewrite `Location` host/port on redirects based on the request              |\n| `protocolRewrite`       | `string`                               | —          | Rewrite `Location` protocol on redirects (`'http'` or `'https'`)            |\n| `cookieDomainRewrite`   | `false \\| string \\| object`            | `false`    | Rewrite domain of `Set-Cookie` headers                                      |\n| `cookiePathRewrite`     | `false \\| string \\| object`            | `false`    | Rewrite path of `Set-Cookie` headers                                        |\n| `headers`               | `object`                               | —          | Extra headers to add to target requests                                     |\n| `proxyTimeout`          | `number`                               | `120000`   | Timeout (ms) for the proxy request to the target                            |\n| `timeout`               | `number`                               | —          | Timeout (ms) for the incoming request                                       |\n| `selfHandleResponse`    | `boolean`                              | `false`    | Disable automatic response piping (handle `proxyRes` yourself)              |\n| `followRedirects`       | `boolean \\| number`                    | `false`    | Follow HTTP redirects from target. `true` = max 5 hops; number = custom max |\n| `buffer`                | `stream.Stream`                        | —          | Stream to use as request body instead of the incoming request               |\n\n## Events\n\n| Event        | Arguments                                | Description                                            |\n| ------------ | ---------------------------------------- | ------------------------------------------------------ |\n| `error`      | `(err, req, res, target)`                | An error occurred during proxying                      |\n| `proxyReq`   | `(proxyReq, req, res, options)`          | Before request is sent to target (modify headers here) |\n| `proxyRes`   | `(proxyRes, req, res)`                   | Response received from target                          |\n| `proxyReqWs` | `(proxyReq, req, socket, options, head)` | Before WebSocket upgrade request is sent               |\n| `open`       | `(proxySocket)`                          | WebSocket connection opened                            |\n| `close`      | `(proxyRes, proxySocket, proxyHead)`     | WebSocket connection closed                            |\n| `start`      | `(req, res, target)`                     | Proxy processing started                               |\n| `end`        | `(req, res, proxyRes)`                   | Proxy request completed                                |\n\n## Examples\n\n### HTTP Proxy\n\n```ts\nimport { createServer } from \"node:http\";\nimport { createProxyServer } from \"httpxy\";\n\nconst proxy = createProxyServer({});\n\nconst server = createServer(async (req, res) => {\n  await proxy.web(req, res, { target: \"http://localhost:8080\" });\n});\n\nserver.listen(3000);\n```\n\n### WebSocket Proxy\n\n```ts\nimport { createServer } from \"node:http\";\nimport { createProxyServer } from \"httpxy\";\n\nconst proxy = createProxyServer({ target: \"http://localhost:8080\", ws: true });\n\nconst server = createServer(async (req, res) => {\n  await proxy.web(req, res);\n});\n\nserver.on(\"upgrade\", (req, socket, head) => {\n  proxy.ws(req, socket, { target: \"http://localhost:8080\" }, head);\n});\n\nserver.listen(3000);\n```\n\n### Modify Request Headers\n\n```ts\nimport { createServer } from \"node:http\";\nimport { createProxyServer } from \"httpxy\";\n\nconst proxy = createProxyServer({ target: \"http://localhost:8080\" });\n\nproxy.on(\"proxyReq\", (proxyReq) => {\n  proxyReq.setHeader(\"X-Forwarded-By\", \"httpxy\");\n});\n\nconst server = createServer(async (req, res) => {\n  await proxy.web(req, res);\n});\n\nserver.listen(3000);\n```\n\n### HTTPS Proxy\n\n```ts\nimport { readFileSync } from \"node:fs\";\nimport { createProxyServer } from \"httpxy\";\n\nconst proxy = createProxyServer({\n  ssl: {\n    key: readFileSync(\"server-key.pem\", \"utf8\"),\n    cert: readFileSync(\"server-cert.pem\", \"utf8\"),\n  },\n  target: \"https://localhost:8443\",\n  secure: false, // allow self-signed certificates\n});\n\nproxy.listen(3000);\n```\n\n### Standalone Proxy Server\n\n```ts\nimport { createProxyServer } from \"httpxy\";\n\nconst proxy = createProxyServer({\n  target: \"http://localhost:8080\",\n  changeOrigin: true,\n});\n\nproxy.listen(3000);\n```\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## Acknowledgements\n\nPerformance optimizations in httpxy were inspired by analysis of [fast-proxy](https://github.com/fastify/fast-proxy) and [@fastify/http-proxy](https://github.com/fastify/fastify-http-proxy).\n\n## License\n\nMade with ????\n\nPublished under [MIT License](./LICENSE).\n\n<!-- Badges -->\n\n[npm-version-src]: https://img.shields.io/npm/v/httpxy?style=flat&colorA=18181B&colorB=F0DB4F\n[npm-version-href]: https://npmjs.com/package/httpxy\n[npm-downloads-src]: https://img.shields.io/npm/dm/httpxy?style=flat&colorA=18181B&colorB=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&colorA=18181B&colorB=F0DB4F\n[codecov-href]: https://codecov.io/gh/unjs/httpxy\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/httpxy?style=flat&colorA=18181B&colorB=F0DB4F\n[bundle-href]: https://bundlephobia.com/result?p=httpxy\n","_attachments":{},"homepage":"https://github.com/unjs/httpxy#readme","bugs":{"url":"https://github.com/unjs/httpxy/issues"},"license":"MIT"}