Compare commits

...

2 Commits

Author SHA1 Message Date
10857aa12b 3.0.6 2022-07-29 02:30:15 +02:00
c968c7f844 fix(core): update 2022-07-29 02:30:15 +02:00
5 changed files with 4 additions and 18 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@pushrocks/smartproxy", "name": "@pushrocks/smartproxy",
"version": "3.0.5", "version": "3.0.6",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@pushrocks/smartproxy", "name": "@pushrocks/smartproxy",
"version": "3.0.5", "version": "3.0.6",
"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.5", "version": "3.0.6",
"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.5', version: '3.0.6',
description: 'a proxy for handling high workloads of proxying' description: 'a proxy for handling high workloads of proxying'
} }

View File

@ -307,8 +307,6 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
}); });
this.httpsServer; this.httpsServer;
} }
/* this.httpsServer.close();
this.httpsServer.listen(this.port); */
} }
public async addDefaultHeaders(headersArg: { [key: string]: string }) { public async addDefaultHeaders(headersArg: { [key: string]: string }) {

View File

@ -13,18 +13,6 @@ export class PortProxy {
} }
public async start() { 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) => { const cleanUpSockets = (from: plugins.net.Socket, to: plugins.net.Socket) => {
from.end(); from.end();
to.end(); to.end();