Compare commits

...

6 Commits

Author SHA1 Message Date
e9239ed978 3.0.24 2022-07-30 21:29:35 +02:00
baf1844866 fix(core): update 2022-07-30 21:29:34 +02:00
0b3d7f8a06 3.0.23 2022-07-30 21:28:08 +02:00
c38a2745e9 fix(core): update 2022-07-30 21:28:08 +02:00
a0f39d1c5b 3.0.22 2022-07-30 21:25:27 +02:00
c67ac868a5 fix(core): update 2022-07-30 21:25:27 +02:00
4 changed files with 12 additions and 18 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@pushrocks/smartproxy",
"version": "3.0.21",
"version": "3.0.24",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@pushrocks/smartproxy",
"version": "3.0.21",
"version": "3.0.24",
"license": "MIT",
"dependencies": {
"@pushrocks/lik": "^6.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartproxy",
"version": "3.0.21",
"version": "3.0.24",
"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.21',
version: '3.0.24',
description: 'a proxy for handling high workloads of proxying'
}

View File

@ -201,6 +201,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
});
req.on('timeout', () => {
request.end();
request.destroy();
})
}
);
@ -226,6 +227,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
});
response.on('timeout', () => {
res.end();
res.destroy();
});
}
);
@ -278,26 +280,18 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
connection.setTimeout(60000);
let destroyed = false;
this.socketMap.add(connection);
console.log(`added connection. now ${this.socketMap.getArray().length} sockets connected.`);
const destroyConnection = () => {
if (!destroyed) {
destroyed = true;
connection.destroy();
console.log(`socket successfully destroyed.`);
}
}
const cleanupConnection = () => {
if (this.socketMap.checkForObject(connection)) {
this.socketMap.remove(connection);
plugins.smartdelay.delayFor(200).then(() => {
destroyConnection();
});
console.log(`removed connection. ${this.socketMap.getArray().length} sockets remaining.`);
connection.end(() => {
destroyConnection();
});
connection.end();
connection.destroy();
console.log(`socket successfully destroyed.`);
plugins.smartdelay.delayFor(10000).then(() => {
connection.removeAllListeners();
})
}
};
connection.on('close', () => {