Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
9b1ff5eed8 | |||
0739d1093a | |||
ee4f7fc48d | |||
f6e656361b |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.55",
|
||||
"version": "3.0.57",
|
||||
"private": false,
|
||||
"description": "a proxy for handling high workloads of proxying",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartproxy',
|
||||
version: '3.0.55',
|
||||
version: '3.0.57',
|
||||
description: 'a proxy for handling high workloads of proxying'
|
||||
}
|
||||
|
@ -260,18 +260,27 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
}
|
||||
|
||||
wsIncoming.on("message", (message, isBinary) => {
|
||||
console.log("client to upstream", message);
|
||||
// console.log("client to upstream", message);
|
||||
wsOutgoing.send(message, { binary: isBinary });
|
||||
});
|
||||
|
||||
wsOutgoing.on("message", (message, isBinary) => {
|
||||
console.log("upstream to client", message);
|
||||
// console.log("upstream to client", message);
|
||||
wsIncoming.send(message, { binary: isBinary });
|
||||
});
|
||||
wsIncoming.on("error", () => wsOutgoing.terminate());
|
||||
wsOutgoing.on("error", () => wsIncoming.terminate());
|
||||
wsIncoming.on("close", () => wsOutgoing.terminate());
|
||||
wsOutgoing.on("close", () => wsIncoming.terminate());
|
||||
const terminateWsOutgoing = () => {
|
||||
wsOutgoing.terminate();
|
||||
console.log('terminated outgoing ws.');
|
||||
}
|
||||
wsIncoming.on("error", () => terminateWsOutgoing());
|
||||
wsIncoming.on("close", () => terminateWsOutgoing());
|
||||
|
||||
const terminateWsIncoming = () => {
|
||||
wsIncoming.terminate();
|
||||
console.log('terminated incoming ws.');
|
||||
}
|
||||
wsOutgoing.on("error", () => terminateWsIncoming());
|
||||
wsOutgoing.on("close", () => terminateWsIncoming());
|
||||
|
||||
});
|
||||
this.httpsServer.keepAliveTimeout = 600 * 1000;
|
||||
|
Reference in New Issue
Block a user