Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
28d050851f | |||
acbd109985 | |||
cc38a6d10e | |||
748b07efe2 | |||
be4fd0978a | |||
4521010b82 | |||
bd1f1a4c1c | |||
d3bdd56660 | |||
c38a7c4c32 | |||
858628196a | |||
4910679058 | |||
97db2012ca | |||
0ee13b4e06 | |||
21f5882fa3 | |||
48b43f9f0d | |||
d3d476fd53 | |||
b80b8a0a20 | |||
384943f697 | |||
e9239ed978 | |||
baf1844866 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.23",
|
||||
"version": "3.0.33",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.23",
|
||||
"version": "3.0.33",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^6.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.23",
|
||||
"version": "3.0.33",
|
||||
"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.23',
|
||||
version: '3.0.33',
|
||||
description: 'a proxy for handling high workloads of proxying'
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
) => {
|
||||
res.writeHead(statusArg, messageArg);
|
||||
res.end(messageArg);
|
||||
res.destroy();
|
||||
};
|
||||
|
||||
console.log(`got request: ${req.headers.host}${plugins.url.parse(req.url).path}`);
|
||||
@ -200,8 +201,8 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
request.end();
|
||||
});
|
||||
req.on('timeout', () => {
|
||||
req.destroy();
|
||||
request.end();
|
||||
request.destroy();
|
||||
})
|
||||
}
|
||||
);
|
||||
@ -227,8 +228,9 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
});
|
||||
response.on('timeout', () => {
|
||||
res.end();
|
||||
res.destroy();
|
||||
res.destroy()
|
||||
});
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@ -259,9 +261,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
|
||||
// handle closing
|
||||
const cleanUp = () => {
|
||||
ws.close();
|
||||
ws.terminate();
|
||||
wsc.close();
|
||||
wsc.terminate();
|
||||
};
|
||||
|
||||
@ -273,25 +273,18 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
cleanUp();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
this.httpsServer.keepAliveTimeout = 61000;
|
||||
this.httpsServer.headersTimeout = 65000;
|
||||
|
||||
this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
|
||||
connection.setTimeout(60000);
|
||||
this.socketMap.add(connection);
|
||||
console.log(`added connection. now ${this.socketMap.getArray().length} sockets connected.`);
|
||||
const cleanupConnection = () => {
|
||||
if (this.socketMap.checkForObject(connection)) {
|
||||
this.socketMap.remove(connection);
|
||||
console.log(`removed connection. ${this.socketMap.getArray().length} sockets remaining.`);
|
||||
connection.end();
|
||||
connection.destroy();
|
||||
console.log(`socket successfully destroyed.`);
|
||||
/* plugins.smartdelay.delayFor(10000).then(() => {
|
||||
connection.removeAllListeners();
|
||||
}) */
|
||||
}
|
||||
};
|
||||
connection.on('close', () => {
|
||||
@ -305,7 +298,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
});
|
||||
connection.on('timeout', () => {
|
||||
cleanupConnection();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
this.httpsServer.listen(this.options.port);
|
||||
|
Reference in New Issue
Block a user