Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
28d050851f | |||
acbd109985 | |||
cc38a6d10e | |||
748b07efe2 | |||
be4fd0978a | |||
4521010b82 | |||
bd1f1a4c1c | |||
d3bdd56660 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartproxy",
|
"name": "@pushrocks/smartproxy",
|
||||||
"version": "3.0.29",
|
"version": "3.0.33",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@pushrocks/smartproxy",
|
"name": "@pushrocks/smartproxy",
|
||||||
"version": "3.0.29",
|
"version": "3.0.33",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^6.0.0",
|
"@pushrocks/lik": "^6.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartproxy",
|
"name": "@pushrocks/smartproxy",
|
||||||
"version": "3.0.29",
|
"version": "3.0.33",
|
||||||
"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",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartproxy',
|
name: '@pushrocks/smartproxy',
|
||||||
version: '3.0.29',
|
version: '3.0.33',
|
||||||
description: 'a proxy for handling high workloads of proxying'
|
description: 'a proxy for handling high workloads of proxying'
|
||||||
}
|
}
|
||||||
|
@ -128,6 +128,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
|||||||
) => {
|
) => {
|
||||||
res.writeHead(statusArg, messageArg);
|
res.writeHead(statusArg, messageArg);
|
||||||
res.end(messageArg);
|
res.end(messageArg);
|
||||||
|
res.destroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(`got request: ${req.headers.host}${plugins.url.parse(req.url).path}`);
|
console.log(`got request: ${req.headers.host}${plugins.url.parse(req.url).path}`);
|
||||||
@ -200,6 +201,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
|||||||
request.end();
|
request.end();
|
||||||
});
|
});
|
||||||
req.on('timeout', () => {
|
req.on('timeout', () => {
|
||||||
|
req.destroy();
|
||||||
request.end();
|
request.end();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -226,6 +228,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
|||||||
});
|
});
|
||||||
response.on('timeout', () => {
|
response.on('timeout', () => {
|
||||||
res.end();
|
res.end();
|
||||||
|
res.destroy()
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -258,8 +261,8 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
|||||||
|
|
||||||
// handle closing
|
// handle closing
|
||||||
const cleanUp = () => {
|
const cleanUp = () => {
|
||||||
ws.close();
|
ws.terminate();
|
||||||
wsc.close();
|
wsc.terminate();
|
||||||
};
|
};
|
||||||
|
|
||||||
ws.on('close', (message) => {
|
ws.on('close', (message) => {
|
||||||
@ -281,6 +284,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
|||||||
if (this.socketMap.checkForObject(connection)) {
|
if (this.socketMap.checkForObject(connection)) {
|
||||||
this.socketMap.remove(connection);
|
this.socketMap.remove(connection);
|
||||||
console.log(`removed connection. ${this.socketMap.getArray().length} sockets remaining.`);
|
console.log(`removed connection. ${this.socketMap.getArray().length} sockets remaining.`);
|
||||||
|
connection.destroy();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
connection.on('close', () => {
|
connection.on('close', () => {
|
||||||
|
Reference in New Issue
Block a user