From c968c7f844f3270cc1945a80e30bf7e91a827925 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 29 Jul 2022 02:30:15 +0200 Subject: [PATCH] fix(core): update --- ts/00_commitinfo_data.ts | 2 +- ts/smartproxy.classes.networkproxy.ts | 2 -- ts/smartproxy.portproxy.ts | 12 ------------ 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 8ac450f..9217e29 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@pushrocks/smartproxy', - version: '3.0.5', + version: '3.0.6', description: 'a proxy for handling high workloads of proxying' } diff --git a/ts/smartproxy.classes.networkproxy.ts b/ts/smartproxy.classes.networkproxy.ts index 1262222..da8806d 100644 --- a/ts/smartproxy.classes.networkproxy.ts +++ b/ts/smartproxy.classes.networkproxy.ts @@ -307,8 +307,6 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g= }); this.httpsServer; } - /* this.httpsServer.close(); - this.httpsServer.listen(this.port); */ } public async addDefaultHeaders(headersArg: { [key: string]: string }) { diff --git a/ts/smartproxy.portproxy.ts b/ts/smartproxy.portproxy.ts index 8f2dec4..b45a0f0 100644 --- a/ts/smartproxy.portproxy.ts +++ b/ts/smartproxy.portproxy.ts @@ -13,18 +13,6 @@ export class PortProxy { } public async start() { - httpServer = plugins.http.createServer((request, response) => { - const requestUrl = new URL(request.url, `http://${request.headers.host}`); - const completeUrlWithoutProtocol = `${requestUrl.host}${requestUrl.pathname}${requestUrl.search}`; - const redirectUrl = `https://${completeUrlWithoutProtocol}`; - console.log(`Got http request for http://${completeUrlWithoutProtocol}`); - console.log(`Redirecting to ${redirectUrl}`); - response.writeHead(302, { - Location: redirectUrl, - }); - response.end(); - }); - httpServer.listen(this.fromPort); const cleanUpSockets = (from: plugins.net.Socket, to: plugins.net.Socket) => { from.end(); to.end();