{"name":"proxy","version":"1.0.2","keywords":["http","https","proxy","connect","tunnel","squid","privoxy","apache","mod_proxy","via","x-forwarded-for"],"author":{"url":"http://n8.io/","name":"Nathan Rajlich","email":"nathan@tootallnate.net"},"license":"MIT","_id":"proxy@1.0.2","maintainers":[{"name":"tootallnate","email":"nathan@tootallnate.net"}],"homepage":"https://github.com/TooTallNate/proxy#readme","bugs":{"url":"https://github.com/TooTallNate/proxy/issues"},"bin":{"proxy":"bin/proxy.js"},"pkg":{"targets":["node8-alpine-x64","node8-linux-x64","node8-macos-x64","node8-win-x64"]},"dist":{"shasum":"e0cfbe11c0a7a8b238fd2d7134de4e2867578e7f","tarball":"http://registry-npm.ywwl.com/proxy/download/proxy-1.0.2.tgz","fileCount":8,"integrity":"sha512-KNac2ueWRpjbUh77OAFPZuNdfEqNynm9DD4xHT14CccGpW8wKZwEkN0yjlb7X9G9Z9F55N0Q+1z+WfgAhwYdzQ==","signatures":[{"sig":"MEQCIGlvtNySzupTq7VI9n3MehY0kcjx7Ee7QlyTg5bkPCusAiAc+3eVpBj+Gzxildz6tC0PZhxH4uQTD2dCy8ebZYGOXg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8SJlCRA9TVsSAnZWagAARRUQAJ52ss63VxVUY1uKC54Q\nnAS6jnDPLkOd/l6bGHaiwdhNEI8BF+7A4O5JUYv1MGDVyPapB5PBw5ivDO6r\nmHmfNGlaxGTDUdxFJ1m3Q64kUsPkiZc6Dp7Y16cTupoQJo9r4A8otRZIODTG\nPZ2Rlmh5vr201J9CIX/rk2Rqhd4IRdXVZWCkMqibRQ9d2nKdceGNdXFQWhpl\nS3dvr0q91zMea3HY637eL7EBvomlrayNrxcF3MSqOcIT3Duo8c2LS//KM/FW\nnyHYnv8YesDmbWdo397ApPF2M7V43QENcM9DgcavQ4nnSky6OP2NxYu5kTTD\nx/MfQriE3DX2RZAq6md3DkoJlEqrnCRaL0+oBgldL9EBDNNtGQBAKKbP4l9U\n7CvUCD8aSDsNySOMaAbQ7W5tfYUeXQ9ZeN3eSnVfU83L3vD9HoDOWUU2pGqu\nXN24Y7/JfDhgahDr90N/KJxhZIePEaKWvfUApmI5WqYg2rnu1LEGheoxL9h3\nb4hXHQA1rgJJocvC9/xBcZXsVvH/4ltWjY3dLtJ1+9MEZ1E+RkkSWhEG7YjM\n29wscmJWS6J4RDi4+iOldWel6XQeSryrk4SSHDn/HKpFyk3Nij6Nf5SfZ0vL\nYz3a1zqwJhNgRZnu2LXl9W0mmXxoNjlTcem0DahD/ZnH3z3Hu7lX/kI8x3XE\nPl63\r\n=9etR\r\n-----END PGP SIGNATURE-----\r\n","size":9602,"noattachment":false,"key":"/proxy/-/proxy-1.0.2.tgz"},"main":"proxy.js","gitHead":"d677ef31fd4ca9f7e868b34c18b9cb22b0ff69da","scripts":{"test":"mocha --reporter spec","start":"node ./bin/proxy.js"},"_npmUser":{"name":"tootallnate","email":"nathan@tootallnate.net"},"repository":{"url":"git://github.com/TooTallNate/proxy.git","type":"git"},"_npmVersion":"6.14.4","description":"An HTTP proxy written with Node.js (think Squid)","directories":{},"_nodeVersion":"12.18.0","dependencies":{"args":"5.0.1","debug":"^4.1.1","basic-auth-parser":"0.0.2"},"_hasShrinkwrap":false,"devDependencies":{"pkg":"^4.3.5","mocha":"6","eslint":"5.16.0","rimraf":"^3.0.0","cpy-cli":"^2.0.0","typescript":"^3.6.4","@types/node":"^10.5.3","@types/mocha":"^5.2.7","eslint-plugin-react":"7.12.4","eslint-config-airbnb":"17.1.0","eslint-plugin-import":"2.16.0","eslint-config-prettier":"4.1.0","eslint-plugin-jsx-a11y":"6.2.1","@typescript-eslint/parser":"1.1.0","@typescript-eslint/eslint-plugin":"1.6.0","eslint-import-resolver-typescript":"1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/proxy_1.0.2_1592861285023_0.926168964832994","host":"s3://npm-registry-packages"},"readme":"proxy\n=====\n### An HTTP proxy written with Node.js (think Squid)\n\nThis module provides standard \"HTTP proxy\" logic. You can script your own server\nusing the `proxy` server API. Be sure to take a look at the \"Examples\" section\nbelow.\n\nThere is also a companion `proxy(1)` CLI tool, which spawns an HTTP(s) proxy\nserver with the specified options.\n\nYou could think of `proxy(1)` as similar to some of the other popular open\nsource HTTP proxy software:\n\n * [Squid][]\n * [Privoxy][]\n * [Apache][] with [`mod_proxy`][mod_proxy]\n * [More…](http://wikipedia.org/wiki/Proxy_server#Web_proxy_servers)\n\nExamples\n--------\n\n#### Basic HTTP(s) proxy server\n\nA basic HTTP(s) server with all the default options. All requests are allowed.\nCONNECT HTTP method works as well.\n\n```ts\nimport * as http from 'http';\nimport { createProxy } from 'proxy';\n\nconst server = createProxy(http.createServer());\nserver.listen(3128, () => {\n  var port = server.address().port;\n  console.log('HTTP(s) proxy server listening on port %d', port);\n});\n```\n\n\nCLI Tool Examples\n-----------------\n\nThe `proxy(1)` CLI tool can be used to spawn HTTP(s) proxy server instances with\nvarious options.\n\n#### Port to bind to\n\nPass the `-p`/`--port` option to with a port number to specify a TCP port to\nbind to. Defaults to __3128__ if none is specified.\n\n``` bash\n$ proxy --port 8080\n```\n\n#### Custom `Proxy-Authenticate` command\n\nPass the `-a`/`--authenticate` switch with a command to execute when the client\n`Proxy-Authorization` header is given. This command determines whether or not the\nrequest is authorized based on the \"exit code\" of the command.\n\nThe relevant request authentication information is passed in as\n`PROXY_AUTH_USERNAME`, `PROXY_AUTH_PASSWORD` and `PROXY_AUTH_SCHEME` environment\nvariables.\n\nFor example, to authorize \"Basic\" authentication with username \"foo\" and\npassword \"bar\":\n\n``` bash\n$ proxy --authenticate 'if \\\n    [ \"$PROXY_AUTH_USERNAME\" = \"foo\" ] && \\\n    [ \"$PROXY_AUTH_PASSWORD\" = \"bar\" ]; \\\n      then exit 0; \\\n    fi; \\\n    exit 1;'\n```\n\n#### Custom outgoing interface\n\nPass the `-l`/`--local-address` argument with an IP address of the network\ninterface to send the outgoing requests through. It is the equivalent of setting\na `localAddress` field in the options when calling `http.request()`.\n\n``` bash\n$ proxy --local-address 192.168.0.10\n```\n\n[Squid]: http://www.squid-cache.org/\n[Privoxy]: http://www.privoxy.org/\n[Apache]: http://www.apache.org/\n[mod_proxy]: http://httpd.apache.org/docs/current/mod/mod_proxy.html\n","publish_time":1592861285194,"_cnpm_publish_time":1592861285194,"dist-tags":{"latest":"4.1.0"}}