tcp-proxy.js
Advanced tools
Comparing version 1.1.1 to 1.2.0
1.2.0 / 2018-06-05 | ||
================== | ||
* Added hostname as an optional parameter | ||
* docs: update license | ||
1.1.0 / 2017-09-21 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -37,2 +37,3 @@ 'use strict'; | ||
super(); | ||
this.host = options.host; | ||
this.port = options.port; | ||
@@ -42,3 +43,4 @@ this.clients = []; | ||
createProxy({ port, forwardPort, forwardHost, interceptor }) { | ||
createProxy({ host, port, forwardPort, forwardHost, interceptor }) { | ||
const proxyHost = host || this.host; | ||
const proxyPort = port || this.port; | ||
@@ -101,3 +103,3 @@ forwardHost = forwardHost || '127.0.0.1'; | ||
}) | ||
.listen(proxyPort); | ||
.listen(proxyPort, proxyHost); | ||
@@ -104,0 +106,0 @@ this.server.once('error', e => { |
{ | ||
"name": "tcp-proxy.js", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "simple tcp proxy", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
@@ -83,1 +83,5 @@ # tcp-proxy.js | ||
``` | ||
## License | ||
MIT |
8233
5
113
86