{"_id":"tcp-proxy.js","_rev":"1213506","name":"tcp-proxy.js","description":"simple tcp proxy","dist-tags":{"latest":"1.3.0"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"time":{"modified":"2021-10-13T05:46:48.000Z","created":"2017-09-07T13:13:57.962Z","1.3.0":"2019-06-14T07:44:52.681Z","1.2.0":"2018-06-05T03:23:02.533Z","1.1.1":"2017-09-21T06:15:24.126Z","1.1.0":"2017-09-21T04:53:43.114Z","1.0.5":"2017-09-08T14:52:10.646Z","1.0.4":"2017-09-08T14:49:32.146Z","1.0.3":"2017-09-08T02:50:16.331Z","1.0.2":"2017-09-08T01:58:45.163Z","1.0.1":"2017-09-07T15:01:06.947Z","1.0.0":"2017-09-07T13:13:57.962Z"},"users":{},"author":{"name":"wanghx"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"versions":{"1.3.0":{"name":"tcp-proxy.js","version":"1.3.0","description":"simple tcp proxy","dependencies":{"debug":"^3.0.1","through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"606893dde8981f8e82688944378f67c94ed67afd","_id":"tcp-proxy.js@1.3.0","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"10ed53e3594218066696bdfdb7200c29512aa79d","size":4302,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.3.0.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js_1.3.0_1560498292531_0.11443450319624682"},"_hasShrinkwrap":false,"publish_time":1560498292681,"_cnpm_publish_time":1560498292681},"1.2.0":{"name":"tcp-proxy.js","version":"1.2.0","description":"simple tcp proxy","dependencies":{"debug":"^3.0.1","through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"97e8422316f5065b288bafa7447725c04224d0c9","_id":"tcp-proxy.js@1.2.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"1cabac4d83b518020457ef35151ba3e352daedec","size":3148,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.2.0.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js_1.2.0_1528168982481_0.8123298462076383"},"_hasShrinkwrap":false,"publish_time":1528168982533,"_cnpm_publish_time":1528168982533},"1.1.1":{"name":"tcp-proxy.js","version":"1.1.1","description":"simple tcp proxy","dependencies":{"debug":"^3.0.1","through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"bdfb0387f9643f0af7802b34eae665019ac87d71","_id":"tcp-proxy.js@1.1.1","_shasum":"9465b7103b128c70f4b49efafbc6bab50db592e2","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"9465b7103b128c70f4b49efafbc6bab50db592e2","size":2358,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.1.1.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js-1.1.1.tgz_1505974523999_0.13705773162655532"},"directories":{},"publish_time":1505974524126,"_hasShrinkwrap":false,"_cnpm_publish_time":1505974524126},"1.1.0":{"name":"tcp-proxy.js","version":"1.1.0","description":"simple tcp proxy","dependencies":{"debug":"^3.0.1","through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"e222327c5aa9bf2acbdc697b7b7e3e3bed3bb73b","_id":"tcp-proxy.js@1.1.0","_shasum":"e14c5800eb61a8c98427a3b9987d3e4365088a6e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"e14c5800eb61a8c98427a3b9987d3e4365088a6e","size":2346,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.1.0.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js-1.1.0.tgz_1505969622995_0.6005767702590674"},"directories":{},"publish_time":1505969623114,"_cnpm_publish_time":1505969623114,"_hasShrinkwrap":false},"1.0.5":{"name":"tcp-proxy.js","version":"1.0.5","description":"simple tcp proxy","dependencies":{"through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"4224839be35ee1f4cdfb4d0f1f388c84cff8cc6c","_id":"tcp-proxy.js@1.0.5","_shasum":"93b5bb585735ced9905d751902710048afa07cc5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"93b5bb585735ced9905d751902710048afa07cc5","size":2083,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.0.5.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js-1.0.5.tgz_1504882330575_0.9829491737764329"},"directories":{},"publish_time":1504882330646,"_cnpm_publish_time":1504882330646,"_hasShrinkwrap":false},"1.0.4":{"name":"tcp-proxy.js","version":"1.0.4","description":"simple tcp proxy","dependencies":{"through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"c28ef22d527206273c661237443ffd7b5399eecb","_id":"tcp-proxy.js@1.0.4","_shasum":"b118043bdf98c112de622bc0a8265aa75037cf7e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"b118043bdf98c112de622bc0a8265aa75037cf7e","size":2082,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.0.4.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js-1.0.4.tgz_1504882172075_0.5577246262691915"},"directories":{},"publish_time":1504882172146,"_cnpm_publish_time":1504882172146,"_hasShrinkwrap":false},"1.0.3":{"name":"tcp-proxy.js","version":"1.0.3","description":"simple tcp proxy","dependencies":{"through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"7ef2ae9ae92df2f7b1a86fcd078072332da32698","_id":"tcp-proxy.js@1.0.3","_shasum":"ef895052ab77b9ef92db1b3824c37b5f844c3014","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"ef895052ab77b9ef92db1b3824c37b5f844c3014","size":2062,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.0.3.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js-1.0.3.tgz_1504839016235_0.13503384683281183"},"directories":{},"publish_time":1504839016331,"_hasShrinkwrap":false,"_cnpm_publish_time":1504839016331},"1.0.2":{"name":"tcp-proxy.js","version":"1.0.2","description":"simple tcp proxy","dependencies":{"through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"5bd2b5bda13235fff652024a85323640bb7d40e8","_id":"tcp-proxy.js@1.0.2","_shasum":"7caf7e68e3068a0994d2bfd12d15c7379645f100","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"7caf7e68e3068a0994d2bfd12d15c7379645f100","size":2068,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.0.2.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js-1.0.2.tgz_1504835924585_0.10612303158268332"},"directories":{},"publish_time":1504835925163,"_hasShrinkwrap":false,"_cnpm_publish_time":1504835925163},"1.0.1":{"name":"tcp-proxy.js","version":"1.0.1","description":"simple tcp proxy","dependencies":{"through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"9e8d5201ebd779967f91aad21f02c0349c2dec96","_id":"tcp-proxy.js@1.0.1","_shasum":"fc9548027a987c4b590f63eae75ce76fcf4bef90","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"fc9548027a987c4b590f63eae75ce76fcf4bef90","size":2040,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.0.1.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js-1.0.1.tgz_1504796466028_0.7554812552407384"},"directories":{},"publish_time":1504796466947,"_cnpm_publish_time":1504796466947,"_hasShrinkwrap":false},"1.0.0":{"name":"tcp-proxy.js","version":"1.0.0","description":"simple tcp proxy","dependencies":{"through2":"^2.0.3"},"devDependencies":{"autod":"^2.8.0","co":"^4.6.0","egg-bin":"^3.4.0","egg-ci":"^1.7.0","eslint":"^4.0.0","eslint-config-egg":"^4.2.0","urllib":"^2.24.0","webstorm-disable-index":"^1.2.0"},"engines":{"node":">=6.0.0"},"scripts":{"autod":"autod","lint":"eslint .","test":"npm run lint -- --fix && egg-bin pkgfiles && npm run test-local","test-local":"egg-bin test","cov":"egg-bin cov","ci":"npm run lint && egg-bin pkgfiles --check && npm run cov","pkgfiles":"egg-bin pkgfiles"},"ci":{"version":"6, 8"},"repository":{"type":"git","url":"git+https://github.com/whxaxes/tcp-proxy.js.git"},"bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"files":["index.js"],"author":{"name":"wanghx"},"license":"MIT","main":"index.js","keywords":["tcp","proxy"],"gitHead":"a258146c7ab2a8ec90cae3c898c64a99978720fe","_id":"tcp-proxy.js@1.0.0","_shasum":"9623ca23fbbc804ff15ae0a9abb773eef62e7209","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"wanghx","email":"whxaxes@gmail.com"},"dist":{"shasum":"9623ca23fbbc804ff15ae0a9abb773eef62e7209","size":2039,"noattachment":false,"key":"/tcp-proxy.js/-/tcp-proxy.js-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tcp-proxy.js/download/tcp-proxy.js-1.0.0.tgz"},"maintainers":[{"name":"wanghx","email":"851094531@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tcp-proxy.js-1.0.0.tgz_1504790037833_0.2888422354590148"},"directories":{},"publish_time":1504790037962,"_cnpm_publish_time":1504790037962,"_hasShrinkwrap":false}},"readme":"# tcp-proxy.js\n\nA TCP Proxy package for NodeJS\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Appveyor status][appveyor-image]][appveyor-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n\n[npm-image]: https://img.shields.io/npm/v/tcp-proxy.js.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/tcp-proxy.js\n[travis-url]: https://travis-ci.org/whxaxes/tcp-proxy.js\n[travis-image]: http://img.shields.io/travis/whxaxes/tcp-proxy.js.svg\n[appveyor-url]: https://ci.appveyor.com/project/whxaxes/tcp-proxy.js/branch/master\n[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/whxaxes/tcp-proxy.js?branch=master&svg=true\n[coveralls-url]: https://coveralls.io/r/whxaxes/tcp-proxy.js\n[coveralls-image]: https://img.shields.io/coveralls/whxaxes/tcp-proxy.js.svg\n\n## Usage\n\n```bash\n$ npm i tcp-proxy.js --save\n```\n\n### Create a new proxy instance\n\n```js\nconst TCPProxy = require('tcp-proxy.js');\nconst proxy = new TCPProxy({ port: 9229 });\nproxy.createProxy({\n  forwardPort: 9999,\n  forwardHost: 'localhost',\n});\n```\n\n### Create a new proxy instance for a specific IP/Hostname\nThis will only listen to connections on the specified IP/Hostname, you can have duplicates of ports this way.\n\n```js\nconst TCPProxy = require('tcp-proxy.js');\nconst proxy = new TCPProxy({ host: 'localhost', port: 9229 });\nproxy.createProxy({\n  forwardPort: 9999,\n  forwardHost: 'localhost',\n});\n```\n\n### End proxy\n\n```js\nproxy.end();\n```\n\n### Interceptor\n\n```js\nproxy.createProxy({\n  forwardPort: 9999,\n  interceptor: {\n    client(chunk) {\n      // request => proxy server => interceptor.client => forward server\n      const data = chunk.toString();\n      const newData = data.replace('GET / ', 'GET /tom ');\n      return Buffer.from(newData);\n    },\n    server(chunk) {\n      // forward server => interceptor.server => proxy server => response\n      const data = chunk.toString();\n      const newData = data.replace('hello tom', 'bello tom');\n      return Buffer.from(newData);\n    },\n  },\n});\n```\n\n### Async Interceptor\n\n```js\nproxy.createProxy({\n  forwardPort: 9999,\n  interceptor: {\n    client(chunk) {\n      // request => proxy server => interceptor.client => forward server\n      const data = chunk.toString();\n      return new Promise(resolve => {\n        setTimeout(() => {\n          const newData = data.replace('GET / ', 'GET /tom ');\n          resolve(Buffer.from(newData));\n        }, 200);\n      });\n    },\n  },\n});\n```\n\n\n### Connection Information\n\n#### IP, Port of Client, Server and Self\n\n```js\nproxy.createProxy({\n  forwardPort: 9999,\n  interceptor: {\n    client(result, encoding, connection) {\n      console.info('Connection from ', connection.client.ip, ':', connection.client.port, 'to', connection.self.ip, ':', connection.self.port, 'from', connection.server.ip, ':', connection.server.port);\n      return result\n    }\n  },\n});\n```\n\n#### Data size\n\n```js\nproxy.createProxy({\n  forwardPort: 9999,\n  interceptor: {\n    server(result, encoding, connection) {\n      console.log('Connection Size:' + connection.size);\n      return result\n    }\n  },\n});\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/whxaxes/tcp-proxy.js#readme","bugs":{"url":"https://github.com/whxaxes/tcp-proxy.js/issues"},"license":"MIT"}