Compare commits

...

6 Commits

Author SHA1 Message Date
208790cfcf 3.0.18 2022-07-30 18:29:21 +02:00
5978bbaf66 fix(core): update 2022-07-30 18:29:20 +02:00
1c47eafe5f 3.0.17 2022-07-30 17:32:59 +02:00
69e3a71354 fix(core): update 2022-07-30 17:32:58 +02:00
21e92bf0c1 3.0.16 2022-07-30 17:26:36 +02:00
d732e6e7aa fix(core): update 2022-07-30 17:26:35 +02:00
4 changed files with 26 additions and 7 deletions

4
package-lock.json generated
View File

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

View File

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

View File

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

View File

@ -187,12 +187,22 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
}, },
true, // lets make this streaming true, // lets make this streaming
(request) => { (request) => {
req.setTimeout(60000);
req.on('data', (data) => { req.on('data', (data) => {
request.write(data); request.write(data);
}); });
req.on('end', (data) => { req.on('end', (data) => {
request.end(); request.end();
}); });
req.on('error', () => {
request.end();
});
req.on('close', () => {
request.end();
});
req.on('timeout', () => {
request.end();
})
} }
); );
res.statusCode = response.statusCode; res.statusCode = response.statusCode;
@ -209,6 +219,15 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
response.on('end', () => { response.on('end', () => {
res.end(); res.end();
}); });
response.on('error', () => {
res.end();
});
response.on('close', () => {
res.end();
});
response.on('timeout', () => {
res.end();
});
} }
); );
@ -237,12 +256,12 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
// handle closing // handle closing
const cleanUp = () => { const cleanUp = () => {
ws.removeAllListeners();
ws.close(); ws.close();
ws.terminate(); ws.terminate();
wsc.removeAllListeners(); ws.removeAllListeners();
wsc.close(); wsc.close();
wsc.terminate(); wsc.terminate();
wsc.removeAllListeners();
}; };
ws.on('close', (message) => { ws.on('close', (message) => {
@ -256,7 +275,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
this.httpsServer.headersTimeout = 65000; this.httpsServer.headersTimeout = 65000;
this.httpsServer.on('connection', (connection: plugins.net.Socket) => { this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
connection.setTimeout(10000); connection.setTimeout(61000);
let destroyed = false; let destroyed = false;
this.socketMap.add(connection); this.socketMap.add(connection);
console.log(`added connection. now ${this.socketMap.getArray().length} sockets connected.`); console.log(`added connection. now ${this.socketMap.getArray().length} sockets connected.`);