@push.rocks/smartproxy 18.2.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/common/eventUtils.d.ts +1 -2
- package/dist_ts/common/eventUtils.js +2 -1
- package/dist_ts/core/models/common-types.d.ts +1 -1
- package/dist_ts/core/models/common-types.js +1 -1
- package/dist_ts/core/utils/event-utils.d.ts +9 -9
- package/dist_ts/core/utils/event-utils.js +6 -14
- package/dist_ts/http/models/http-types.d.ts +13 -1
- package/dist_ts/http/models/http-types.js +1 -1
- package/dist_ts/index.d.ts +4 -6
- package/dist_ts/index.js +4 -10
- package/dist_ts/proxies/index.d.ts +3 -2
- package/dist_ts/proxies/index.js +4 -5
- package/dist_ts/proxies/network-proxy/certificate-manager.d.ts +31 -49
- package/dist_ts/proxies/network-proxy/certificate-manager.js +77 -374
- package/dist_ts/proxies/network-proxy/models/types.d.ts +12 -1
- package/dist_ts/proxies/network-proxy/models/types.js +1 -1
- package/dist_ts/proxies/network-proxy/network-proxy.d.ts +2 -7
- package/dist_ts/proxies/network-proxy/network-proxy.js +10 -19
- package/dist_ts/proxies/smart-proxy/models/index.d.ts +1 -1
- package/dist_ts/proxies/smart-proxy/models/index.js +1 -5
- package/dist_ts/proxies/smart-proxy/models/interfaces.d.ts +13 -1
- package/dist_ts/proxies/smart-proxy/smart-proxy.js +2 -3
- package/package.json +1 -1
- package/readme.md +13 -5
- package/readme.plan.md +37 -20
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/common/eventUtils.ts +2 -2
- package/ts/core/models/common-types.ts +1 -1
- package/ts/core/utils/event-utils.ts +12 -21
- package/ts/http/models/http-types.ts +8 -4
- package/ts/index.ts +11 -14
- package/ts/proxies/index.ts +7 -4
- package/ts/proxies/network-proxy/certificate-manager.ts +92 -417
- package/ts/proxies/network-proxy/models/types.ts +14 -2
- package/ts/proxies/network-proxy/network-proxy.ts +10 -19
- package/ts/proxies/smart-proxy/models/index.ts +2 -1
- package/ts/proxies/smart-proxy/models/interfaces.ts +14 -1
- package/ts/proxies/smart-proxy/models/route-types.ts +1 -1
- package/ts/proxies/smart-proxy/smart-proxy.ts +1 -2
- package/ts/certificate/acme/acme-factory.ts +0 -48
- package/ts/certificate/acme/challenge-handler.ts +0 -110
- package/ts/certificate/acme/index.ts +0 -3
- package/ts/certificate/events/certificate-events.ts +0 -36
- package/ts/certificate/index.ts +0 -75
- package/ts/certificate/models/certificate-types.ts +0 -109
- package/ts/certificate/providers/cert-provisioner.ts +0 -519
- package/ts/certificate/providers/index.ts +0 -3
- package/ts/certificate/storage/file-storage.ts +0 -234
- package/ts/certificate/storage/index.ts +0 -3
- package/ts/certificate/utils/certificate-helpers.ts +0 -50
- package/ts/http/port80/acme-interfaces.ts +0 -169
- package/ts/http/port80/challenge-responder.ts +0 -246
- package/ts/http/port80/index.ts +0 -13
- package/ts/http/port80/port80-handler.ts +0 -728
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartproxy',
|
|
6
|
-
version: '
|
|
6
|
+
version: '19.0.0',
|
|
7
7
|
description: 'A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHFQQUFxUDtDQUNuUSxDQUFBIn0=
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Port80Handler } from '../http/port80/port80-handler.js';
|
|
2
1
|
import type { ICertificateData, ICertificateFailure, ICertificateExpiring } from './types.js';
|
|
3
2
|
/**
|
|
4
3
|
* Subscribers callback definitions for Port80Handler events
|
|
@@ -12,4 +11,4 @@ export interface Port80HandlerSubscribers {
|
|
|
12
11
|
/**
|
|
13
12
|
* Subscribes to Port80Handler events based on provided callbacks
|
|
14
13
|
*/
|
|
15
|
-
export declare function subscribeToPort80Handler(handler:
|
|
14
|
+
export declare function subscribeToPort80Handler(handler: any, subscribers: Port80HandlerSubscribers): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// Port80Handler removed - use SmartCertManager instead
|
|
1
2
|
import { Port80HandlerEvents } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* Subscribes to Port80Handler events based on provided callbacks
|
|
@@ -16,4 +17,4 @@ export function subscribeToPort80Handler(handler, subscribers) {
|
|
|
16
17
|
handler.on(Port80HandlerEvents.CERTIFICATE_EXPIRING, subscribers.onCertificateExpiring);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRVdGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2NvbW1vbi9ldmVudFV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHVEQUF1RDtBQUN2RCxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFhakQ7O0dBRUc7QUFDSCxNQUFNLFVBQVUsd0JBQXdCLENBQ3RDLE9BQVksRUFDWixXQUFxQztJQUVyQyxJQUFJLFdBQVcsQ0FBQyxtQkFBbUIsRUFBRSxDQUFDO1FBQ3BDLE9BQU8sQ0FBQyxFQUFFLENBQUMsbUJBQW1CLENBQUMsa0JBQWtCLEVBQUUsV0FBVyxDQUFDLG1CQUFtQixDQUFDLENBQUM7SUFDdEYsQ0FBQztJQUNELElBQUksV0FBVyxDQUFDLG9CQUFvQixFQUFFLENBQUM7UUFDckMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxtQkFBbUIsQ0FBQyxtQkFBbUIsRUFBRSxXQUFXLENBQUMsb0JBQW9CLENBQUMsQ0FBQztJQUN4RixDQUFDO0lBQ0QsSUFBSSxXQUFXLENBQUMsbUJBQW1CLEVBQUUsQ0FBQztRQUNwQyxPQUFPLENBQUMsRUFBRSxDQUFDLG1CQUFtQixDQUFDLGtCQUFrQixFQUFFLFdBQVcsQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDO0lBQ3RGLENBQUM7SUFDRCxJQUFJLFdBQVcsQ0FBQyxxQkFBcUIsRUFBRSxDQUFDO1FBQ3RDLE9BQU8sQ0FBQyxFQUFFLENBQUMsbUJBQW1CLENBQUMsb0JBQW9CLEVBQUUsV0FBVyxDQUFDLHFCQUFxQixDQUFDLENBQUM7SUFDMUYsQ0FBQztBQUNILENBQUMifQ==
|
|
@@ -28,7 +28,7 @@ export interface ICertificateData {
|
|
|
28
28
|
expiryDate: Date;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Events emitted by the Port80Handler
|
|
31
|
+
* @deprecated Events emitted by the Port80Handler - use SmartCertManager instead
|
|
32
32
|
*/
|
|
33
33
|
export declare enum Port80HandlerEvents {
|
|
34
34
|
CERTIFICATE_ISSUED = "certificate-issued",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { Port80HandlerEvents } from '../models/common-types.js';
|
|
2
|
+
export { Port80HandlerEvents };
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* @deprecated Use SmartCertManager instead
|
|
5
5
|
*/
|
|
6
6
|
export interface IPort80HandlerSubscribers {
|
|
7
|
-
onCertificateIssued?: (data:
|
|
8
|
-
onCertificateRenewed?: (data:
|
|
9
|
-
onCertificateFailed?: (data:
|
|
10
|
-
onCertificateExpiring?: (data:
|
|
7
|
+
onCertificateIssued?: (data: any) => void;
|
|
8
|
+
onCertificateRenewed?: (data: any) => void;
|
|
9
|
+
onCertificateFailed?: (data: any) => void;
|
|
10
|
+
onCertificateExpiring?: (data: any) => void;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* @deprecated Use SmartCertManager instead
|
|
14
14
|
*/
|
|
15
|
-
export declare function subscribeToPort80Handler(handler:
|
|
15
|
+
export declare function subscribeToPort80Handler(handler: any, subscribers: IPort80HandlerSubscribers): void;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
+
// Port80Handler has been removed - use SmartCertManager instead
|
|
1
2
|
import { Port80HandlerEvents } from '../models/common-types.js';
|
|
3
|
+
// Re-export for backward compatibility
|
|
4
|
+
export { Port80HandlerEvents };
|
|
2
5
|
/**
|
|
3
|
-
*
|
|
6
|
+
* @deprecated Use SmartCertManager instead
|
|
4
7
|
*/
|
|
5
8
|
export function subscribeToPort80Handler(handler, subscribers) {
|
|
6
|
-
|
|
7
|
-
handler.on(Port80HandlerEvents.CERTIFICATE_ISSUED, subscribers.onCertificateIssued);
|
|
8
|
-
}
|
|
9
|
-
if (subscribers.onCertificateRenewed) {
|
|
10
|
-
handler.on(Port80HandlerEvents.CERTIFICATE_RENEWED, subscribers.onCertificateRenewed);
|
|
11
|
-
}
|
|
12
|
-
if (subscribers.onCertificateFailed) {
|
|
13
|
-
handler.on(Port80HandlerEvents.CERTIFICATE_FAILED, subscribers.onCertificateFailed);
|
|
14
|
-
}
|
|
15
|
-
if (subscribers.onCertificateExpiring) {
|
|
16
|
-
handler.on(Port80HandlerEvents.CERTIFICATE_EXPIRING, subscribers.onCertificateExpiring);
|
|
17
|
-
}
|
|
9
|
+
console.warn('subscribeToPort80Handler is deprecated - use SmartCertManager instead');
|
|
18
10
|
}
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90cy9jb3JlL3V0aWxzL2V2ZW50LXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGdFQUFnRTtBQUNoRSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUVoRSx1Q0FBdUM7QUFDdkMsT0FBTyxFQUFFLG1CQUFtQixFQUFFLENBQUM7QUFZL0I7O0dBRUc7QUFDSCxNQUFNLFVBQVUsd0JBQXdCLENBQ3RDLE9BQVksRUFDWixXQUFzQztJQUV0QyxPQUFPLENBQUMsSUFBSSxDQUFDLHVFQUF1RSxDQUFDLENBQUM7QUFDeEYsQ0FBQyJ9
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import * as plugins from '../../plugins.js';
|
|
2
|
-
|
|
2
|
+
export interface IDomainOptions {
|
|
3
|
+
domainName: string;
|
|
4
|
+
sslRedirect: boolean;
|
|
5
|
+
acmeMaintenance: boolean;
|
|
6
|
+
forward?: {
|
|
7
|
+
ip: string;
|
|
8
|
+
port: number;
|
|
9
|
+
};
|
|
10
|
+
acmeForward?: {
|
|
11
|
+
ip: string;
|
|
12
|
+
port: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
3
15
|
/**
|
|
4
16
|
* HTTP-specific event types
|
|
5
17
|
*/
|
|
@@ -59,4 +59,4 @@ export class ServerError extends HttpError {
|
|
|
59
59
|
// Backward compatibility interfaces
|
|
60
60
|
export { HttpError as Port80HandlerError };
|
|
61
61
|
export { CertificateError as CertError };
|
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cC10eXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3RzL2h0dHAvbW9kZWxzL2h0dHAtdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxrQkFBa0IsQ0FBQztBQVU1Qzs7R0FFRztBQUNILE1BQU0sQ0FBTixJQUFZLFVBS1g7QUFMRCxXQUFZLFVBQVU7SUFDcEIsbURBQXFDLENBQUE7SUFDckMscURBQXVDLENBQUE7SUFDdkMsaURBQW1DLENBQUE7SUFDbkMsNkNBQStCLENBQUE7QUFDakMsQ0FBQyxFQUxXLFVBQVUsS0FBVixVQUFVLFFBS3JCO0FBRUQ7O0dBRUc7QUFDSCxNQUFNLENBQU4sSUFBWSxVQVlYO0FBWkQsV0FBWSxVQUFVO0lBQ3BCLHlDQUFRLENBQUE7SUFDUix1RUFBdUIsQ0FBQTtJQUN2QiwrQ0FBVyxDQUFBO0lBQ1gseUVBQXdCLENBQUE7SUFDeEIseUVBQXdCLENBQUE7SUFDeEIsMkRBQWlCLENBQUE7SUFDakIsdURBQWUsQ0FBQTtJQUNmLHlFQUF3QixDQUFBO0lBQ3hCLCtFQUEyQixDQUFBO0lBQzNCLG1FQUFxQixDQUFBO0lBQ3JCLDJFQUF5QixDQUFBO0FBQzNCLENBQUMsRUFaVyxVQUFVLEtBQVYsVUFBVSxRQVlyQjtBQWVEOztHQUVHO0FBQ0gsTUFBTSxPQUFPLFNBQVUsU0FBUSxLQUFLO0lBQ2xDLFlBQVksT0FBZTtRQUN6QixLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDZixJQUFJLENBQUMsSUFBSSxHQUFHLFdBQVcsQ0FBQztJQUMxQixDQUFDO0NBQ0Y7QUFFRDs7R0FFRztBQUNILE1BQU0sT0FBTyxnQkFBaUIsU0FBUSxTQUFTO0lBQzdDLFlBQ0UsT0FBZSxFQUNDLE1BQWMsRUFDZCxZQUFxQixLQUFLO1FBRTFDLEtBQUssQ0FBQyxHQUFHLE9BQU8sZUFBZSxNQUFNLEdBQUcsU0FBUyxDQUFDLENBQUMsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFIekQsV0FBTSxHQUFOLE1BQU0sQ0FBUTtRQUNkLGNBQVMsR0FBVCxTQUFTLENBQWlCO1FBRzFDLElBQUksQ0FBQyxJQUFJLEdBQUcsa0JBQWtCLENBQUM7SUFDakMsQ0FBQztDQUNGO0FBRUQ7O0dBRUc7QUFDSCxNQUFNLE9BQU8sV0FBWSxTQUFRLFNBQVM7SUFDeEMsWUFBWSxPQUFlLEVBQWtCLElBQWE7UUFDeEQsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBRDRCLFNBQUksR0FBSixJQUFJLENBQVM7UUFFeEQsSUFBSSxDQUFDLElBQUksR0FBRyxhQUFhLENBQUM7SUFDNUIsQ0FBQztDQUNGO0FBdUJELG9DQUFvQztBQUNwQyxPQUFPLEVBQUUsU0FBUyxJQUFJLGtCQUFrQixFQUFFLENBQUM7QUFDM0MsT0FBTyxFQUFFLGdCQUFnQixJQUFJLFNBQVMsRUFBRSxDQUFDIn0=
|
package/dist_ts/index.d.ts
CHANGED
|
@@ -4,19 +4,17 @@
|
|
|
4
4
|
export * from './proxies/nftables-proxy/index.js';
|
|
5
5
|
export { NetworkProxy, CertificateManager, ConnectionPool, RequestHandler, WebSocketHandler } from './proxies/network-proxy/index.js';
|
|
6
6
|
export type { IMetricsTracker, MetricsTracker } from './proxies/network-proxy/index.js';
|
|
7
|
-
export
|
|
7
|
+
export type { INetworkProxyOptions, ICertificateEntry, ILogger } from './proxies/network-proxy/models/types.js';
|
|
8
8
|
export { RouteManager as NetworkProxyRouteManager } from './proxies/network-proxy/models/types.js';
|
|
9
|
-
export { Port80Handler, Port80HandlerError as HttpError, ServerError, CertificateError } from './http/port80/port80-handler.js';
|
|
10
|
-
export { Port80HandlerEvents } from './certificate/events/certificate-events.js';
|
|
11
9
|
export * from './redirect/classes.redirect.js';
|
|
12
10
|
export { SmartProxy, ConnectionManager, SecurityManager, TimeoutManager, TlsManager, NetworkProxyBridge, RouteConnectionHandler } from './proxies/smart-proxy/index.js';
|
|
13
11
|
export { RouteManager } from './proxies/smart-proxy/route-manager.js';
|
|
14
|
-
export
|
|
12
|
+
export type { ISmartProxyOptions, IConnectionRecord, IRouteConfig, IRouteMatch, IRouteAction, IRouteTls, IRouteContext } from './proxies/smart-proxy/models/index.js';
|
|
13
|
+
export type { TSmartProxyCertProvisionObject } from './proxies/smart-proxy/models/interfaces.js';
|
|
15
14
|
export * from './proxies/smart-proxy/utils/index.js';
|
|
16
15
|
export { SniHandler } from './tls/sni/sni-handler.js';
|
|
17
|
-
export * from './proxies/smart-proxy/models/interfaces.js';
|
|
18
16
|
export * from './core/models/common-types.js';
|
|
17
|
+
export type { IAcmeOptions } from './proxies/smart-proxy/models/interfaces.js';
|
|
19
18
|
export * as forwarding from './forwarding/index.js';
|
|
20
|
-
export * as certificate from './certificate/index.js';
|
|
21
19
|
export * as tls from './tls/index.js';
|
|
22
20
|
export * as http from './http/index.js';
|
package/dist_ts/index.js
CHANGED
|
@@ -6,29 +6,23 @@
|
|
|
6
6
|
export * from './proxies/nftables-proxy/index.js';
|
|
7
7
|
// Export NetworkProxy elements selectively to avoid RouteManager ambiguity
|
|
8
8
|
export { NetworkProxy, CertificateManager, ConnectionPool, RequestHandler, WebSocketHandler } from './proxies/network-proxy/index.js';
|
|
9
|
-
export * from './proxies/network-proxy/models/index.js';
|
|
10
9
|
export { RouteManager as NetworkProxyRouteManager } from './proxies/network-proxy/models/types.js';
|
|
11
|
-
//
|
|
12
|
-
export { Port80Handler, Port80HandlerError as HttpError, ServerError, CertificateError } from './http/port80/port80-handler.js';
|
|
13
|
-
// Use re-export to control the names
|
|
14
|
-
export { Port80HandlerEvents } from './certificate/events/certificate-events.js';
|
|
10
|
+
// Certificate and Port80 modules have been removed - use SmartCertManager instead
|
|
15
11
|
export * from './redirect/classes.redirect.js';
|
|
16
12
|
// Export SmartProxy elements selectively to avoid RouteManager ambiguity
|
|
17
13
|
export { SmartProxy, ConnectionManager, SecurityManager, TimeoutManager, TlsManager, NetworkProxyBridge, RouteConnectionHandler } from './proxies/smart-proxy/index.js';
|
|
18
14
|
export { RouteManager } from './proxies/smart-proxy/route-manager.js';
|
|
19
|
-
export * from './proxies/smart-proxy/models/index.js';
|
|
20
15
|
export * from './proxies/smart-proxy/utils/index.js';
|
|
21
16
|
// Original: export * from './smartproxy/classes.pp.snihandler.js'
|
|
22
17
|
// Now we export from the new module
|
|
23
18
|
export { SniHandler } from './tls/sni/sni-handler.js';
|
|
24
19
|
// Original: export * from './smartproxy/classes.pp.interfaces.js'
|
|
25
|
-
// Now we export from the new module
|
|
26
|
-
export * from './proxies/smart-proxy/models/interfaces.js';
|
|
20
|
+
// Now we export from the new module (selectively to avoid conflicts)
|
|
27
21
|
// Core types and utilities
|
|
28
22
|
export * from './core/models/common-types.js';
|
|
29
23
|
// Modular exports for new architecture
|
|
30
24
|
export * as forwarding from './forwarding/index.js';
|
|
31
|
-
|
|
25
|
+
// Certificate module has been removed - use SmartCertManager instead
|
|
32
26
|
export * as tls from './tls/index.js';
|
|
33
27
|
export * as http from './http/index.js';
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILHNEQUFzRDtBQUN0RCx3Q0FBd0M7QUFDeEMsY0FBYyxtQ0FBbUMsQ0FBQztBQUVsRCwyRUFBMkU7QUFDM0UsT0FBTyxFQUFFLFlBQVksRUFBRSxrQkFBa0IsRUFBRSxjQUFjLEVBQUUsY0FBYyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sa0NBQWtDLENBQUM7QUFJdEksT0FBTyxFQUFFLFlBQVksSUFBSSx3QkFBd0IsRUFBRSxNQUFNLHlDQUF5QyxDQUFDO0FBRW5HLGtGQUFrRjtBQUVsRixjQUFjLGdDQUFnQyxDQUFDO0FBRS9DLHlFQUF5RTtBQUN6RSxPQUFPLEVBQUUsVUFBVSxFQUFFLGlCQUFpQixFQUFFLGVBQWUsRUFBRSxjQUFjLEVBQUUsVUFBVSxFQUFFLGtCQUFrQixFQUFFLHNCQUFzQixFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDeEssT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHdDQUF3QyxDQUFDO0FBSXRFLGNBQWMsc0NBQXNDLENBQUM7QUFFckQsa0VBQWtFO0FBQ2xFLG9DQUFvQztBQUNwQyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDdEQsa0VBQWtFO0FBQ2xFLHFFQUFxRTtBQUVyRSwyQkFBMkI7QUFDM0IsY0FBYywrQkFBK0IsQ0FBQztBQUs5Qyx1Q0FBdUM7QUFDdkMsT0FBTyxLQUFLLFVBQVUsTUFBTSx1QkFBdUIsQ0FBQztBQUNwRCxxRUFBcUU7QUFDckUsT0FBTyxLQUFLLEdBQUcsTUFBTSxnQkFBZ0IsQ0FBQztBQUN0QyxPQUFPLEtBQUssSUFBSSxNQUFNLGlCQUFpQixDQUFDIn0=
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { NetworkProxy, CertificateManager, ConnectionPool, RequestHandler, WebSocketHandler } from './network-proxy/index.js';
|
|
5
5
|
export type { IMetricsTracker, MetricsTracker } from './network-proxy/index.js';
|
|
6
|
-
export
|
|
6
|
+
export type { INetworkProxyOptions, ICertificateEntry, ILogger } from './network-proxy/models/types.js';
|
|
7
|
+
export { RouteManager as NetworkProxyRouteManager } from './network-proxy/models/types.js';
|
|
7
8
|
export { SmartProxy, ConnectionManager, SecurityManager, TimeoutManager, TlsManager, NetworkProxyBridge, RouteConnectionHandler } from './smart-proxy/index.js';
|
|
8
9
|
export { RouteManager as SmartProxyRouteManager } from './smart-proxy/route-manager.js';
|
|
9
10
|
export * from './smart-proxy/utils/index.js';
|
|
10
|
-
export
|
|
11
|
+
export type { ISmartProxyOptions, IConnectionRecord, IRouteConfig, IRouteMatch, IRouteAction, IRouteTls, IRouteContext } from './smart-proxy/models/index.js';
|
|
11
12
|
export * from './nftables-proxy/index.js';
|
package/dist_ts/proxies/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Proxy implementations module
|
|
3
3
|
*/
|
|
4
|
-
// Export NetworkProxy with selective imports to avoid
|
|
4
|
+
// Export NetworkProxy with selective imports to avoid conflicts
|
|
5
5
|
export { NetworkProxy, CertificateManager, ConnectionPool, RequestHandler, WebSocketHandler } from './network-proxy/index.js';
|
|
6
|
-
export
|
|
7
|
-
// Export SmartProxy with selective imports to avoid
|
|
6
|
+
export { RouteManager as NetworkProxyRouteManager } from './network-proxy/models/types.js';
|
|
7
|
+
// Export SmartProxy with selective imports to avoid conflicts
|
|
8
8
|
export { SmartProxy, ConnectionManager, SecurityManager, TimeoutManager, TlsManager, NetworkProxyBridge, RouteConnectionHandler } from './smart-proxy/index.js';
|
|
9
9
|
export { RouteManager as SmartProxyRouteManager } from './smart-proxy/route-manager.js';
|
|
10
10
|
export * from './smart-proxy/utils/index.js';
|
|
11
|
-
export * from './smart-proxy/models/index.js';
|
|
12
11
|
// Export NFTables proxy (no conflicts)
|
|
13
12
|
export * from './nftables-proxy/index.js';
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9wcm94aWVzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsZ0VBQWdFO0FBQ2hFLE9BQU8sRUFBRSxZQUFZLEVBQUUsa0JBQWtCLEVBQUUsY0FBYyxFQUFFLGNBQWMsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBSTlILE9BQU8sRUFBRSxZQUFZLElBQUksd0JBQXdCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUUzRiw4REFBOEQ7QUFDOUQsT0FBTyxFQUFFLFVBQVUsRUFBRSxpQkFBaUIsRUFBRSxlQUFlLEVBQUUsY0FBYyxFQUFFLFVBQVUsRUFBRSxrQkFBa0IsRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ2hLLE9BQU8sRUFBRSxZQUFZLElBQUksc0JBQXNCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN4RixjQUFjLDhCQUE4QixDQUFDO0FBSTdDLHVDQUF1QztBQUN2QyxjQUFjLDJCQUEyQixDQUFDIn0=
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as plugins from '../../plugins.js';
|
|
2
|
-
import { type INetworkProxyOptions
|
|
3
|
-
import { Port80Handler } from '../../http/port80/port80-handler.js';
|
|
2
|
+
import { type INetworkProxyOptions } from './models/types.js';
|
|
4
3
|
import type { IRouteConfig } from '../smart-proxy/models/route-types.js';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* @deprecated This class is deprecated. Use SmartCertManager instead.
|
|
6
|
+
*
|
|
7
|
+
* This is a stub implementation that maintains backward compatibility
|
|
8
|
+
* while the functionality has been moved to SmartCertManager.
|
|
7
9
|
*/
|
|
8
10
|
export declare class CertificateManager {
|
|
9
11
|
private options;
|
|
10
12
|
private defaultCertificates;
|
|
11
13
|
private certificateCache;
|
|
12
|
-
private port80Handler;
|
|
13
|
-
private externalPort80Handler;
|
|
14
14
|
private certificateStoreDir;
|
|
15
15
|
private logger;
|
|
16
16
|
private httpsServer;
|
|
@@ -20,79 +20,61 @@ export declare class CertificateManager {
|
|
|
20
20
|
*/
|
|
21
21
|
loadDefaultCertificates(): void;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Generates self-signed certificates as fallback
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
private generateSelfSignedCertificate;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Gets the default certificates
|
|
28
28
|
*/
|
|
29
29
|
getDefaultCertificates(): {
|
|
30
30
|
key: string;
|
|
31
31
|
cert: string;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
setExternalPort80Handler(handler: Port80Handler): void;
|
|
37
|
-
/**
|
|
38
|
-
* Update route configurations managed by this certificate manager
|
|
39
|
-
* This method is called when route configurations change
|
|
40
|
-
*
|
|
41
|
-
* @param routes Array of route configurations
|
|
34
|
+
* @deprecated Use SmartCertManager instead
|
|
42
35
|
*/
|
|
43
|
-
|
|
36
|
+
setExternalPort80Handler(handler: any): void;
|
|
44
37
|
/**
|
|
45
|
-
*
|
|
38
|
+
* @deprecated Use SmartCertManager instead
|
|
46
39
|
*/
|
|
47
|
-
|
|
40
|
+
updateRoutes(routes: IRouteConfig[]): Promise<void>;
|
|
48
41
|
/**
|
|
49
|
-
*
|
|
42
|
+
* Handles SNI callback to provide appropriate certificate
|
|
50
43
|
*/
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Saves certificate and private key to the filesystem
|
|
54
|
-
*/
|
|
55
|
-
private saveCertificateToStore;
|
|
44
|
+
handleSNI(domain: string, cb: (err: Error | null, ctx: plugins.tls.SecureContext) => void): void;
|
|
56
45
|
/**
|
|
57
|
-
*
|
|
58
|
-
* Used by the HTTPS server to select the correct certificate for each domain
|
|
46
|
+
* Updates a certificate in the cache
|
|
59
47
|
*/
|
|
60
|
-
|
|
48
|
+
updateCertificate(domain: string, cert: string, key: string): void;
|
|
61
49
|
/**
|
|
62
|
-
*
|
|
50
|
+
* Gets a cached certificate
|
|
63
51
|
*/
|
|
64
|
-
|
|
52
|
+
private getCachedCertificate;
|
|
65
53
|
/**
|
|
66
|
-
*
|
|
54
|
+
* @deprecated Use SmartCertManager instead
|
|
67
55
|
*/
|
|
68
|
-
|
|
56
|
+
initializePort80Handler(): Promise<any>;
|
|
69
57
|
/**
|
|
70
|
-
*
|
|
58
|
+
* @deprecated Use SmartCertManager instead
|
|
71
59
|
*/
|
|
72
|
-
|
|
60
|
+
stopPort80Handler(): Promise<void>;
|
|
73
61
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @param domains String array of domains to register
|
|
62
|
+
* @deprecated Use SmartCertManager instead
|
|
76
63
|
*/
|
|
77
64
|
registerDomainsWithPort80Handler(domains: string[]): void;
|
|
78
65
|
/**
|
|
79
|
-
*
|
|
80
|
-
* This method enables direct integration with route-based configuration
|
|
81
|
-
*
|
|
82
|
-
* @param routes Array of route configurations
|
|
66
|
+
* @deprecated Use SmartCertManager instead
|
|
83
67
|
*/
|
|
84
68
|
registerRoutesWithPort80Handler(routes: IRouteConfig[]): void;
|
|
85
69
|
/**
|
|
86
|
-
*
|
|
87
|
-
* @param route Route configuration to process
|
|
88
|
-
*/
|
|
89
|
-
processRouteForCertificates(route: IRouteConfig): void;
|
|
90
|
-
/**
|
|
91
|
-
* Initialize internal Port80Handler
|
|
70
|
+
* Sets the HTTPS server for certificate updates
|
|
92
71
|
*/
|
|
93
|
-
|
|
72
|
+
setHttpsServer(server: plugins.https.Server): void;
|
|
94
73
|
/**
|
|
95
|
-
*
|
|
74
|
+
* Gets statistics for metrics
|
|
96
75
|
*/
|
|
97
|
-
|
|
76
|
+
getStats(): {
|
|
77
|
+
cachedCertificates: number;
|
|
78
|
+
defaultCertEnabled: boolean;
|
|
79
|
+
};
|
|
98
80
|
}
|