Compare commits

...

2 Commits

4 changed files with 14 additions and 6 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## 2025-02-21 - 3.4.3 - fix(PortProxy)
Fixed indentation issue and ensured proper cleanup of sockets in PortProxy
- Fixed inconsistent indentation in IP allowance check.
- Ensured proper cleanup of sockets on connection end in PortProxy.
## 2025-02-21 - 3.4.2 - fix(smartproxy)
Enhance SSL/TLS handling with SNI and error logging

View File

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

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartproxy',
version: '3.4.2',
version: '3.4.3',
description: 'a proxy for handling high workloads of proxying'
}

View File

@ -113,10 +113,10 @@ export class PortProxy {
}
}
} else if (!this.settings.defaultAllowedIPs || !isAllowed(remoteIP, this.settings.defaultAllowedIPs)) {
console.log(`Connection rejected: IP ${remoteIP} not allowed for non-SNI connection`);
from.end();
return;
}
console.log(`Connection rejected: IP ${remoteIP} not allowed for non-SNI connection`);
from.end();
return;
}
const to = plugins.net.createConnection({
host: this.settings.toHost!,
@ -150,6 +150,8 @@ export class PortProxy {
to.on('end', () => {
cleanUpSockets(from, to);
});
};
this.netServer = server
.on('connection', handleConnection)
.on('secureConnection', handleConnection)