@push.rocks/smartproxy 18.2.0 → 19.2.2
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/certificate-manager.d.ts +6 -0
- package/dist_ts/proxies/smart-proxy/certificate-manager.js +24 -5
- 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 +30 -1
- package/dist_ts/proxies/smart-proxy/route-manager.d.ts +4 -0
- package/dist_ts/proxies/smart-proxy/route-manager.js +7 -1
- package/dist_ts/proxies/smart-proxy/smart-proxy.d.ts +4 -0
- package/dist_ts/proxies/smart-proxy/smart-proxy.js +112 -26
- package/package.json +1 -2
- package/readme.hints.md +31 -1
- package/readme.md +82 -6
- package/readme.plan.md +109 -1417
- 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/certificate-manager.ts +31 -4
- package/ts/proxies/smart-proxy/models/index.ts +2 -1
- package/ts/proxies/smart-proxy/models/interfaces.ts +31 -2
- package/ts/proxies/smart-proxy/models/route-types.ts +1 -1
- package/ts/proxies/smart-proxy/route-manager.ts +7 -0
- package/ts/proxies/smart-proxy/smart-proxy.ts +142 -25
- 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
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartproxy',
|
|
6
|
-
version: '
|
|
6
|
+
version: '19.2.2',
|
|
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
|
}
|
package/ts/common/eventUtils.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// Port80Handler removed - use SmartCertManager instead
|
|
2
2
|
import { Port80HandlerEvents } from './types.js';
|
|
3
3
|
import type { ICertificateData, ICertificateFailure, ICertificateExpiring } from './types.js';
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ export interface Port80HandlerSubscribers {
|
|
|
16
16
|
* Subscribes to Port80Handler events based on provided callbacks
|
|
17
17
|
*/
|
|
18
18
|
export function subscribeToPort80Handler(
|
|
19
|
-
handler:
|
|
19
|
+
handler: any,
|
|
20
20
|
subscribers: Port80HandlerSubscribers
|
|
21
21
|
): void {
|
|
22
22
|
if (subscribers.onCertificateIssued) {
|
|
@@ -34,7 +34,7 @@ export interface ICertificateData {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Events emitted by the Port80Handler
|
|
37
|
+
* @deprecated Events emitted by the Port80Handler - use SmartCertManager instead
|
|
38
38
|
*/
|
|
39
39
|
export enum Port80HandlerEvents {
|
|
40
40
|
CERTIFICATE_ISSUED = 'certificate-issued',
|
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
// Port80Handler has been removed - use SmartCertManager instead
|
|
2
2
|
import { Port80HandlerEvents } from '../models/common-types.js';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
// Re-export for backward compatibility
|
|
5
|
+
export { Port80HandlerEvents };
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
8
|
+
* @deprecated Use SmartCertManager instead
|
|
7
9
|
*/
|
|
8
10
|
export interface IPort80HandlerSubscribers {
|
|
9
|
-
onCertificateIssued?: (data:
|
|
10
|
-
onCertificateRenewed?: (data:
|
|
11
|
-
onCertificateFailed?: (data:
|
|
12
|
-
onCertificateExpiring?: (data:
|
|
11
|
+
onCertificateIssued?: (data: any) => void;
|
|
12
|
+
onCertificateRenewed?: (data: any) => void;
|
|
13
|
+
onCertificateFailed?: (data: any) => void;
|
|
14
|
+
onCertificateExpiring?: (data: any) => void;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
18
|
+
* @deprecated Use SmartCertManager instead
|
|
17
19
|
*/
|
|
18
20
|
export function subscribeToPort80Handler(
|
|
19
|
-
handler:
|
|
21
|
+
handler: any,
|
|
20
22
|
subscribers: IPort80HandlerSubscribers
|
|
21
23
|
): void {
|
|
22
|
-
|
|
23
|
-
handler.on(Port80HandlerEvents.CERTIFICATE_ISSUED, subscribers.onCertificateIssued);
|
|
24
|
-
}
|
|
25
|
-
if (subscribers.onCertificateRenewed) {
|
|
26
|
-
handler.on(Port80HandlerEvents.CERTIFICATE_RENEWED, subscribers.onCertificateRenewed);
|
|
27
|
-
}
|
|
28
|
-
if (subscribers.onCertificateFailed) {
|
|
29
|
-
handler.on(Port80HandlerEvents.CERTIFICATE_FAILED, subscribers.onCertificateFailed);
|
|
30
|
-
}
|
|
31
|
-
if (subscribers.onCertificateExpiring) {
|
|
32
|
-
handler.on(Port80HandlerEvents.CERTIFICATE_EXPIRING, subscribers.onCertificateExpiring);
|
|
33
|
-
}
|
|
24
|
+
console.warn('subscribeToPort80Handler is deprecated - use SmartCertManager instead');
|
|
34
25
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as plugins from '../../plugins.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
// Certificate types have been removed - use SmartCertManager instead
|
|
3
|
+
export interface IDomainOptions {
|
|
4
|
+
domainName: string;
|
|
5
|
+
sslRedirect: boolean;
|
|
6
|
+
acmeMaintenance: boolean;
|
|
7
|
+
forward?: { ip: string; port: number };
|
|
8
|
+
acmeForward?: { ip: string; port: number };
|
|
9
|
+
}
|
|
6
10
|
|
|
7
11
|
/**
|
|
8
12
|
* HTTP-specific event types
|
package/ts/index.ts
CHANGED
|
@@ -9,39 +9,36 @@ export * from './proxies/nftables-proxy/index.js';
|
|
|
9
9
|
// Export NetworkProxy elements selectively to avoid RouteManager ambiguity
|
|
10
10
|
export { NetworkProxy, CertificateManager, ConnectionPool, RequestHandler, WebSocketHandler } from './proxies/network-proxy/index.js';
|
|
11
11
|
export type { IMetricsTracker, MetricsTracker } from './proxies/network-proxy/index.js';
|
|
12
|
-
|
|
12
|
+
// Export models except IAcmeOptions to avoid conflict
|
|
13
|
+
export type { INetworkProxyOptions, ICertificateEntry, ILogger } from './proxies/network-proxy/models/types.js';
|
|
13
14
|
export { RouteManager as NetworkProxyRouteManager } from './proxies/network-proxy/models/types.js';
|
|
14
15
|
|
|
15
|
-
//
|
|
16
|
-
export {
|
|
17
|
-
Port80Handler,
|
|
18
|
-
Port80HandlerError as HttpError,
|
|
19
|
-
ServerError,
|
|
20
|
-
CertificateError
|
|
21
|
-
} from './http/port80/port80-handler.js';
|
|
22
|
-
// Use re-export to control the names
|
|
23
|
-
export { Port80HandlerEvents } from './certificate/events/certificate-events.js';
|
|
16
|
+
// Certificate and Port80 modules have been removed - use SmartCertManager instead
|
|
24
17
|
|
|
25
18
|
export * from './redirect/classes.redirect.js';
|
|
26
19
|
|
|
27
20
|
// Export SmartProxy elements selectively to avoid RouteManager ambiguity
|
|
28
21
|
export { SmartProxy, ConnectionManager, SecurityManager, TimeoutManager, TlsManager, NetworkProxyBridge, RouteConnectionHandler } from './proxies/smart-proxy/index.js';
|
|
29
22
|
export { RouteManager } from './proxies/smart-proxy/route-manager.js';
|
|
30
|
-
|
|
23
|
+
// Export smart-proxy models
|
|
24
|
+
export type { ISmartProxyOptions, IConnectionRecord, IRouteConfig, IRouteMatch, IRouteAction, IRouteTls, IRouteContext } from './proxies/smart-proxy/models/index.js';
|
|
25
|
+
export type { TSmartProxyCertProvisionObject } from './proxies/smart-proxy/models/interfaces.js';
|
|
31
26
|
export * from './proxies/smart-proxy/utils/index.js';
|
|
32
27
|
|
|
33
28
|
// Original: export * from './smartproxy/classes.pp.snihandler.js'
|
|
34
29
|
// Now we export from the new module
|
|
35
30
|
export { SniHandler } from './tls/sni/sni-handler.js';
|
|
36
31
|
// Original: export * from './smartproxy/classes.pp.interfaces.js'
|
|
37
|
-
// Now we export from the new module
|
|
38
|
-
export * from './proxies/smart-proxy/models/interfaces.js';
|
|
32
|
+
// Now we export from the new module (selectively to avoid conflicts)
|
|
39
33
|
|
|
40
34
|
// Core types and utilities
|
|
41
35
|
export * from './core/models/common-types.js';
|
|
42
36
|
|
|
37
|
+
// Export IAcmeOptions from one place only
|
|
38
|
+
export type { IAcmeOptions } from './proxies/smart-proxy/models/interfaces.js';
|
|
39
|
+
|
|
43
40
|
// Modular exports for new architecture
|
|
44
41
|
export * as forwarding from './forwarding/index.js';
|
|
45
|
-
|
|
42
|
+
// Certificate module has been removed - use SmartCertManager instead
|
|
46
43
|
export * as tls from './tls/index.js';
|
|
47
44
|
export * as http from './http/index.js';
|
package/ts/proxies/index.ts
CHANGED
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
* Proxy implementations module
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
// Export NetworkProxy with selective imports to avoid
|
|
5
|
+
// Export NetworkProxy with selective imports to avoid conflicts
|
|
6
6
|
export { NetworkProxy, CertificateManager, ConnectionPool, RequestHandler, WebSocketHandler } from './network-proxy/index.js';
|
|
7
7
|
export type { IMetricsTracker, MetricsTracker } from './network-proxy/index.js';
|
|
8
|
-
|
|
8
|
+
// Export network-proxy models except IAcmeOptions
|
|
9
|
+
export type { INetworkProxyOptions, ICertificateEntry, ILogger } from './network-proxy/models/types.js';
|
|
10
|
+
export { RouteManager as NetworkProxyRouteManager } from './network-proxy/models/types.js';
|
|
9
11
|
|
|
10
|
-
// Export SmartProxy with selective imports to avoid
|
|
12
|
+
// Export SmartProxy with selective imports to avoid conflicts
|
|
11
13
|
export { SmartProxy, ConnectionManager, SecurityManager, TimeoutManager, TlsManager, NetworkProxyBridge, RouteConnectionHandler } from './smart-proxy/index.js';
|
|
12
14
|
export { RouteManager as SmartProxyRouteManager } from './smart-proxy/route-manager.js';
|
|
13
15
|
export * from './smart-proxy/utils/index.js';
|
|
14
|
-
|
|
16
|
+
// Export smart-proxy models except IAcmeOptions
|
|
17
|
+
export type { ISmartProxyOptions, IConnectionRecord, IRouteConfig, IRouteMatch, IRouteAction, IRouteTls, IRouteContext } from './smart-proxy/models/index.js';
|
|
15
18
|
|
|
16
19
|
// Export NFTables proxy (no conflicts)
|
|
17
20
|
export * from './nftables-proxy/index.js';
|