Compare commits

...

8 Commits

Author SHA1 Message Date
62e6387c1d 3.0.50 2023-01-05 19:21:03 +01:00
7fe22e962a fix(core): update 2023-01-05 19:21:02 +01:00
3f1f718308 3.0.49 2023-01-05 18:31:55 +01:00
ce94d283c1 fix(core): update 2023-01-05 18:31:55 +01:00
a1c4f3c341 3.0.48 2023-01-05 18:05:36 +01:00
8087bab197 fix(core): update 2023-01-05 18:05:36 +01:00
db63e7bf79 3.0.47 2023-01-05 18:00:51 +01:00
2615a0ebd4 fix(core): update 2023-01-05 18:00:50 +01:00
3 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartproxy",
"version": "3.0.46",
"version": "3.0.50",
"private": false,
"description": "a proxy for handling high workloads of proxying",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartproxy',
version: '3.0.46',
version: '3.0.50',
description: 'a proxy for handling high workloads of proxying'
}

View File

@ -253,7 +253,16 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
ws.on('message', async (message) => {
if (!wscConnectedDeferred) {
wscConnectedDeferred = plugins.smartpromise.defer();
const wsc = new plugins.wsDefault(`wss://${this.router.routeReq(reqArg).destinationIp}${reqArg.url}`);
let wsc: plugins.wsDefault;
try {
wsc = new plugins.wsDefault(`ws://${this.router.routeReq(reqArg).destinationIp}:${this.router.routeReq(reqArg).destinationPort}${reqArg.url}`, {
headers: reqArg.headers
});
} catch (err) {
console.log(err);
ws.terminate();
return;
}
wsc.on('open', () => {
wscConnectedDeferred.resolve(wsc);