Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
ef7e54be34 | |||
d800b6ed6e |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartproxy",
|
"name": "@pushrocks/smartproxy",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartproxy",
|
"name": "@pushrocks/smartproxy",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a proxy for handling high workloads of proxying",
|
"description": "a proxy for handling high workloads of proxying",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -24,8 +24,13 @@ const portProxyCalls = {
|
|||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: 8001
|
port: 8001
|
||||||
});
|
});
|
||||||
from.pipe(to);
|
from.pipe(to)
|
||||||
to.pipe(from);
|
to.pipe(from)
|
||||||
|
from.on('error', () => { from.end(), to.end() });
|
||||||
|
to.on('error', () => { from.end(), to.end() });
|
||||||
|
from.on('close', () => {
|
||||||
|
to.end();
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.listen(portArg);
|
.listen(portArg);
|
||||||
console.log(`PortProxy -> OK: Now listening on port ${portArg}`);
|
console.log(`PortProxy -> OK: Now listening on port ${portArg}`);
|
||||||
|
Reference in New Issue
Block a user