Compare commits

...

6 Commits

Author SHA1 Message Date
963ad6efa4 2.0.14 2021-02-03 15:11:55 +00:00
d271029302 fix(core): update 2021-02-03 15:11:55 +00:00
018fcbf71e 2.0.13 2021-02-03 11:19:57 +00:00
fa04732241 fix(core): update 2021-02-03 11:19:56 +00:00
da19fab8d8 2.0.12 2021-02-03 11:02:26 +00:00
8d318dca28 fix(core): update 2021-02-03 11:02:26 +00:00
3 changed files with 29 additions and 9 deletions

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartproxy",
"version": "2.0.11",
"version": "2.0.14",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -11438,9 +11438,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "7.4.2",
"resolved": "https://verdaccio.lossless.one/ws/-/ws-7.4.2.tgz",
"integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA=="
"version": "7.4.3",
"resolved": "https://verdaccio.lossless.one/ws/-/ws-7.4.3.tgz",
"integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA=="
},
"xml-js": {
"version": "1.6.11",

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartproxy",
"version": "2.0.11",
"version": "2.0.14",
"private": false,
"description": "a proxy for handling high workloads of proxying",
"main": "dist_ts/index.js",
@ -30,7 +30,7 @@
"@pushrocks/smartsystem": "^2.0.9",
"@tsclass/tsclass": "^3.0.29",
"@types/ws": "^7.4.0",
"ws": "^7.4.2"
"ws": "^7.4.3"
},
"files": [
"ts/**/*",

View File

@ -225,10 +225,25 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
this.httpsServer.keepAliveTimeout = 61000;
this.httpsServer.headersTimeout = 65000;
this.httpsServer.on('connection', (connection) => {
this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
connection.setTimeout(120000);
this.socketMap.add(connection);
connection.on('close', () => {
const cleanupConnection = (connectionArg: plugins.net.Socket) => {
connectionArg.removeAllListeners();
this.socketMap.remove(connection);
connection.destroy();
}
connection.on('close', () => {
cleanupConnection(connection);
});
connection.on('error', () => {
cleanupConnection(connection);
});
connection.on('end', () => {
cleanupConnection(connection);
});
connection.on('timeout', () => {
cleanupConnection(connection);
});
});
@ -275,7 +290,12 @@ const proxyWorkerCalls = {
updateReverseConfigs: async (configArray: plugins.tsclass.network.IReverseProxyConfig[]) => {
await proxyWorkerInstance.updateProxyConfigs(configArray);
},
addDefaultHeaders: async (headers: {[key: string]: string}) => {}
addDefaultHeaders: async (headersArg: {[key: string]: string}) => {
proxyWorkerInstance.defaultHeaders = {
...proxyWorkerInstance.defaultHeaders,
...headersArg
};
}
};
export type TProxyWorkerCalls = typeof proxyWorkerCalls;