@push.rocks/smartproxy 13.1.2 → 15.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.
Files changed (29) hide show
  1. package/dist_ts/00_commitinfo_data.js +3 -3
  2. package/dist_ts/proxies/smart-proxy/index.d.ts +5 -3
  3. package/dist_ts/proxies/smart-proxy/index.js +9 -5
  4. package/dist_ts/proxies/smart-proxy/models/index.d.ts +2 -0
  5. package/dist_ts/proxies/smart-proxy/models/index.js +2 -1
  6. package/dist_ts/proxies/smart-proxy/models/interfaces.d.ts +82 -15
  7. package/dist_ts/proxies/smart-proxy/models/interfaces.js +10 -1
  8. package/dist_ts/proxies/smart-proxy/models/route-types.d.ts +133 -0
  9. package/dist_ts/proxies/smart-proxy/models/route-types.js +2 -0
  10. package/dist_ts/proxies/smart-proxy/route-connection-handler.d.ts +55 -0
  11. package/dist_ts/proxies/smart-proxy/route-connection-handler.js +804 -0
  12. package/dist_ts/proxies/smart-proxy/route-helpers.d.ts +127 -0
  13. package/dist_ts/proxies/smart-proxy/route-helpers.js +196 -0
  14. package/dist_ts/proxies/smart-proxy/route-manager.d.ts +103 -0
  15. package/dist_ts/proxies/smart-proxy/route-manager.js +483 -0
  16. package/dist_ts/proxies/smart-proxy/smart-proxy.d.ts +19 -8
  17. package/dist_ts/proxies/smart-proxy/smart-proxy.js +239 -46
  18. package/package.json +2 -2
  19. package/readme.md +863 -423
  20. package/readme.plan.md +311 -250
  21. package/ts/00_commitinfo_data.ts +2 -2
  22. package/ts/proxies/smart-proxy/index.ts +20 -4
  23. package/ts/proxies/smart-proxy/models/index.ts +4 -0
  24. package/ts/proxies/smart-proxy/models/interfaces.ts +91 -13
  25. package/ts/proxies/smart-proxy/models/route-types.ts +184 -0
  26. package/ts/proxies/smart-proxy/route-connection-handler.ts +1117 -0
  27. package/ts/proxies/smart-proxy/route-helpers.ts +344 -0
  28. package/ts/proxies/smart-proxy/route-manager.ts +587 -0
  29. package/ts/proxies/smart-proxy/smart-proxy.ts +300 -69
package/readme.plan.md CHANGED
@@ -1,255 +1,316 @@
1
- # SmartProxy Interface & Type Naming Standardization Plan
1
+ # SmartProxy Fully Unified Configuration Plan (Updated)
2
2
 
3
3
  ## Project Goal
4
- Standardize interface and type naming throughout the SmartProxy codebase to improve maintainability, readability, and developer experience by:
5
- 1. Ensuring all interfaces are prefixed with "I"
6
- 2. Ensuring all type aliases are prefixed with "T"
7
- 3. Maintaining backward compatibility through type aliases
8
- 4. Updating documentation to reflect naming conventions
9
-
10
- ## Phase 2: Core Module Standardization
11
-
12
- - [ ] Update core module interfaces and types
13
- - [ ] Rename interfaces in `ts/core/models/common-types.ts`
14
- - [ ] `AcmeOptions` → `IAcmeOptions`
15
- - [ ] `DomainOptions` → `IDomainOptions`
16
- - [ ] Other common interfaces
17
- - [ ] Add backward compatibility aliases
18
- - [ ] Update imports throughout core module
19
-
20
- - [ ] Update core utility type definitions
21
- - [ ] Update `ts/core/utils/validation-utils.ts`
22
- - [ ] Update `ts/core/utils/ip-utils.ts`
23
- - [ ] Standardize event type definitions
24
-
25
- - [ ] Test core module changes
26
- - [ ] Run unit tests for core modules
27
- - [ ] Verify type compatibility
28
- - [ ] Ensure backward compatibility
29
-
30
- ## Phase 3: Certificate Module Standardization
31
-
32
- - [ ] Update certificate interfaces
33
- - [ ] Rename interfaces in `ts/certificate/models/certificate-types.ts`
34
- - [ ] `CertificateData` → `ICertificateData`
35
- - [ ] `Certificates` `ICertificates`
36
- - [ ] `CertificateFailure` → `ICertificateFailure`
37
- - [ ] `CertificateExpiring` → `ICertificateExpiring`
38
- - [ ] `ForwardConfig` `IForwardConfig`
39
- - [ ] `DomainForwardConfig` → `IDomainForwardConfig`
40
- - [ ] Update ACME challenge interfaces
41
- - [ ] Standardize storage provider interfaces
42
-
43
- - [ ] Ensure certificate provider compatibility
44
- - [ ] Update provider implementations
45
- - [ ] Rename internal interfaces
46
- - [ ] Maintain public API compatibility
47
-
48
- - [ ] Test certificate module
49
- - [ ] Verify ACME functionality
50
- - [ ] Test certificate provisioning
51
- - [ ] Validate challenge handling
52
-
53
- ## Phase 4: Forwarding System Standardization
54
-
55
- - [ ] Update forwarding configuration interfaces
56
- - [ ] Rename interfaces in `ts/forwarding/config/forwarding-types.ts`
57
- - [ ] `TargetConfig` `ITargetConfig`
58
- - [ ] `HttpOptions` → `IHttpOptions`
59
- - [ ] `HttpsOptions` → `IHttpsOptions`
60
- - [ ] `AcmeForwardingOptions` → `IAcmeForwardingOptions`
61
- - [ ] `SecurityOptions` `ISecurityOptions`
62
- - [ ] `AdvancedOptions` → `IAdvancedOptions`
63
- - [ ] `ForwardConfig` `IForwardConfig`
64
- - [ ] Rename type definitions
65
- - [ ] `ForwardingType` → `TForwardingType`
66
- - [ ] Update domain configuration interfaces
67
-
68
- - [ ] Standardize handler interfaces
69
- - [ ] Update base handler interfaces
70
- - [ ] Rename handler-specific interfaces
71
- - [ ] Update factory interfaces
72
-
73
- - [ ] Verify forwarding system functionality
74
- - [ ] Test all forwarding types
75
- - [ ] Verify configuration parsing
76
- - [ ] Ensure backward compatibility
77
-
78
- ## Phase 5: Proxy Implementation Standardization
79
-
80
- - [ ] Update SmartProxy interfaces
81
- - [ ] Rename interfaces in `ts/proxies/smart-proxy/models/interfaces.ts`
82
- - [ ] Update domain configuration interfaces
83
- - [ ] Standardize manager interfaces
84
-
85
- - [ ] Update NetworkProxy interfaces
86
- - [ ] Rename in `ts/proxies/network-proxy/models/types.ts`
87
- - [ ] `NetworkProxyOptions` `INetworkProxyOptions`
88
- - [ ] `CertificateEntry` → `ICertificateEntry`
89
- - [ ] `ReverseProxyConfig` → `IReverseProxyConfig`
90
- - [ ] `ConnectionEntry` → `IConnectionEntry`
91
- - [ ] `WebSocketWithHeartbeat` → `IWebSocketWithHeartbeat`
92
- - [ ] `Logger` → `ILogger`
93
- - [ ] Update request handler interfaces
94
- - [ ] Standardize connection interfaces
95
-
96
- - [ ] Update NfTablesProxy interfaces
97
- - [ ] Rename interfaces in `ts/proxies/nftables-proxy/models/interfaces.ts`
98
- - [ ] Update configuration interfaces
99
- - [ ] Standardize firewall rule interfaces
100
-
101
- - [ ] Test proxy implementations
102
- - [ ] Verify SmartProxy functionality
103
- - [ ] Test NetworkProxy with renamed interfaces
104
- - [ ] Validate NfTablesProxy operations
105
-
106
- ## Phase 6: HTTP & TLS Module Standardization
107
-
108
- - [ ] Update HTTP interfaces
109
- - [ ] Rename in `ts/http/port80/acme-interfaces.ts`
110
- - [ ] `SmartAcmeCert` `ISmartAcmeCert`
111
- - [ ] `SmartAcmeOptions` → `ISmartAcmeOptions`
112
- - [ ] `Http01Challenge` → `IHttp01Challenge`
113
- - [ ] `SmartAcme` → `ISmartAcme`
114
- - [ ] Standardize router interfaces
115
- - [ ] Update port80 handler interfaces
116
- - [ ] Update redirect interfaces
117
-
118
- - [ ] Update TLS/SNI interfaces
119
- - [ ] Standardize SNI handler interfaces
120
- - [ ] Update client hello parser types
121
- - [ ] Rename TLS alert interfaces
122
-
123
- - [ ] Test HTTP & TLS functionality
124
- - [ ] Verify router operation
125
- - [ ] Test SNI extraction
126
- - [ ] Validate redirect functionality
127
-
128
- ## Phase 7: Backward Compatibility Layer
129
-
130
- - [ ] Implement comprehensive type aliases
131
- - [ ] Create aliases for all renamed interfaces
132
- - [ ] Add deprecation notices via JSDoc
133
- - [ ] Ensure all exports include both named versions
134
-
135
- - [ ] Update main entry point
136
- - [ ] Update `ts/index.ts` with all exports
137
- - [ ] Include both prefixed and non-prefixed names
138
- - [ ] Organize exports by module
139
-
140
- - [ ] Add compatibility documentation
141
- - [ ] Document renaming strategy
142
- - [ ] Provide migration examples
143
- - [ ] Create deprecation timeline
144
-
145
- ## Phase 8: Documentation & Examples
146
-
147
- - [ ] Update README and API documentation
148
- - [ ] Update interface references in README.md
149
- - [ ] Document naming convention in README.md
150
- - [ ] Update API reference documentation
151
-
152
- - [ ] Update examples
153
- - [ ] Modify example code to use new interface names
154
- - [ ] Add compatibility notes
155
- - [ ] Create migration examples
156
-
157
- - [ ] Add contributor guidelines
158
- - [ ] Document naming conventions
159
- - [ ] Add interface/type style guide
160
- - [ ] Update PR templates
161
-
162
- ## Phase 9: Testing & Validation
163
-
164
- - [ ] Run comprehensive test suite
165
- - [ ] Run all unit tests
166
- - [ ] Execute integration tests
167
- - [ ] Verify example code
168
-
169
- - [ ] Build type declarations
170
- - [ ] Generate TypeScript declaration files
171
- - [ ] Verify exported types
172
- - [ ] Validate documentation generation
173
-
174
- - [ ] Final compatibility check
175
- - [ ] Verify import compatibility
176
- - [ ] Test with existing dependent projects
177
- - [ ] Validate backward compatibility claims
4
+ Redesign SmartProxy's configuration for a more elegant, unified, and comprehensible approach by:
5
+ 1. Creating a single, unified configuration model that covers both "where to listen" and "how to forward"
6
+ 2. Eliminating the confusion between domain configs and port forwarding
7
+ 3. Providing a clear, declarative API that makes the intent obvious
8
+ 4. Enhancing maintainability and extensibility for future features
9
+ 5. Completely removing legacy code to eliminate technical debt
10
+
11
+ ## Current Issues
12
+
13
+ The current approach has several issues:
14
+
15
+ 1. **Dual Configuration Systems**:
16
+ - Port configuration (`fromPort`, `toPort`, `globalPortRanges`) for "where to listen"
17
+ - Domain configuration (`domainConfigs`) for "how to forward"
18
+ - Unclear relationship between these two systems
19
+
20
+ 2. **Mixed Concerns**:
21
+ - Port management is mixed with forwarding logic
22
+ - Domain routing is separated from port listening
23
+ - Security settings defined in multiple places
24
+
25
+ 3. **Complex Logic**:
26
+ - PortRangeManager must coordinate with domain configuration
27
+ - Implicit rules for handling connections based on port and domain
28
+
29
+ 4. **Difficult to Understand and Configure**:
30
+ - Two separate configuration hierarchies that must work together
31
+ - Unclear which settings take precedence
32
+
33
+ ## Proposed Solution: Fully Unified Routing Configuration
34
+
35
+ Replace both port and domain configuration with a single, unified configuration:
36
+
37
+ ```typescript
38
+ // The core unified configuration interface
39
+ interface IRouteConfig {
40
+ // What to match
41
+ match: {
42
+ // Listen on these ports (required)
43
+ ports: number | number[] | Array<{ from: number, to: number }>;
44
+
45
+ // Optional domain patterns to match (default: all domains)
46
+ domains?: string | string[];
47
+
48
+ // Advanced matching criteria
49
+ path?: string; // Match specific paths
50
+ clientIp?: string[]; // Match specific client IPs
51
+ tlsVersion?: string[]; // Match specific TLS versions
52
+ };
53
+
54
+ // What to do with matched traffic
55
+ action: {
56
+ // Basic routing
57
+ type: 'forward' | 'redirect' | 'block';
58
+
59
+ // Target for forwarding
60
+ target?: {
61
+ host: string | string[]; // Support single host or round-robin
62
+ port: number;
63
+ preservePort?: boolean; // Use incoming port as target port
64
+ };
65
+
66
+ // TLS handling
67
+ tls?: {
68
+ mode: 'passthrough' | 'terminate' | 'terminate-and-reencrypt';
69
+ certificate?: 'auto' | { // Auto = use ACME
70
+ key: string;
71
+ cert: string;
72
+ };
73
+ };
74
+
75
+ // For redirects
76
+ redirect?: {
77
+ to: string; // URL or template with {domain}, {port}, etc.
78
+ status: 301 | 302 | 307 | 308;
79
+ };
80
+
81
+ // Security options
82
+ security?: {
83
+ allowedIps?: string[];
84
+ blockedIps?: string[];
85
+ maxConnections?: number;
86
+ authentication?: {
87
+ type: 'basic' | 'digest' | 'oauth';
88
+ // Auth-specific options
89
+ };
90
+ };
91
+
92
+ // Advanced options
93
+ advanced?: {
94
+ timeout?: number;
95
+ headers?: Record<string, string>;
96
+ keepAlive?: boolean;
97
+ // etc.
98
+ };
99
+ };
100
+
101
+ // Optional metadata
102
+ name?: string; // Human-readable name for this route
103
+ description?: string; // Description of the route's purpose
104
+ priority?: number; // Controls matching order (higher = matched first)
105
+ tags?: string[]; // Arbitrary tags for categorization
106
+ }
107
+
108
+ // Main SmartProxy options
109
+ interface ISmartProxyOptions {
110
+ // The unified configuration array (required)
111
+ routes: IRouteConfig[];
112
+
113
+ // Global/default settings
114
+ defaults?: {
115
+ target?: {
116
+ host: string;
117
+ port: number;
118
+ };
119
+ security?: {
120
+ // Global security defaults
121
+ };
122
+ tls?: {
123
+ // Global TLS defaults
124
+ };
125
+ // ...other defaults
126
+ };
127
+
128
+ // Other global settings remain (acme, etc.)
129
+ acme?: IAcmeOptions;
130
+
131
+ // Advanced settings remain as well
132
+ // ...
133
+ }
134
+ ```
135
+
136
+ ## Revised Implementation Plan
137
+
138
+ ### Phase 1: Core Design & Interface Definition
139
+
140
+ 1. **Define New Core Interfaces**:
141
+ - Create `IRouteConfig` interface with `match` and `action` branches
142
+ - Define all sub-interfaces for matching and actions
143
+ - Create new `ISmartProxyOptions` to use `routes` array exclusively
144
+ - Define template variable system for dynamic values
145
+
146
+ 2. **Create Helper Functions**:
147
+ - `createRoute()` - Basic route creation with reasonable defaults
148
+ - `createHttpRoute()`, `createHttpsRoute()`, `createRedirect()` - Common scenarios
149
+ - `createLoadBalancer()` - For multi-target setups
150
+ - `mergeSecurity()`, `mergeDefaults()` - For combining configs
151
+
152
+ 3. **Design Router**:
153
+ - Decision tree for route matching algorithm
154
+ - Priority system for route ordering
155
+ - Optimized lookup strategy for fast routing
156
+
157
+ ### Phase 2: Core Implementation
158
+
159
+ 1. **Create RouteManager**:
160
+ - Build a new RouteManager to replace both PortRangeManager and DomainConfigManager
161
+ - Implement port and domain matching in one unified system
162
+ - Create efficient route lookup algorithms
163
+
164
+ 2. **Implement New ConnectionHandler**:
165
+ - Create a new ConnectionHandler built from scratch for routes
166
+ - Implement the routing logic with the new match/action pattern
167
+ - Support template processing for headers and other dynamic values
168
+
169
+ 3. **Implement New SmartProxy Core**:
170
+ - Create new SmartProxy implementation using routes exclusively
171
+ - Build network servers based on port specifications
172
+ - Manage TLS contexts and certificates
173
+
174
+ ### Phase 3: Legacy Code Removal
175
+
176
+ 1. **Identify Legacy Components**:
177
+ - Create an inventory of all files and components to be removed
178
+ - Document dependencies between legacy components
179
+ - Create a removal plan that minimizes disruption
180
+
181
+ 2. **Remove Legacy Components**:
182
+ - Remove PortRangeManager and related code
183
+ - Remove DomainConfigManager and related code
184
+ - Remove old ConnectionHandler implementation
185
+ - Remove other legacy components
186
+
187
+ 3. **Clean Interface Adaptations**:
188
+ - Remove all legacy interfaces and types
189
+ - Update type exports to only expose route-based interfaces
190
+ - Remove any adapter or backward compatibility code
191
+
192
+ ### Phase 4: Updated Documentation & Examples
193
+
194
+ 1. **Update Core Documentation**:
195
+ - Rewrite README.md with a focus on route-based configuration exclusively
196
+ - Create interface reference documentation
197
+ - Document all template variables
198
+
199
+ 2. **Create Example Library**:
200
+ - Common configuration patterns using the new API
201
+ - Complex use cases for advanced features
202
+ - Infrastructure-as-code examples
203
+
204
+ 3. **Add Validation Tools**:
205
+ - Configuration validator to check for issues
206
+ - Schema definitions for IDE autocomplete
207
+ - Runtime validation helpers
208
+
209
+ ### Phase 5: Testing
210
+
211
+ 1. **Unit Tests**:
212
+ - Test route matching logic
213
+ - Validate priority handling
214
+ - Test template processing
215
+
216
+ 2. **Integration Tests**:
217
+ - Verify full proxy flows with the new system
218
+ - Test complex routing scenarios
219
+ - Ensure all features work as expected
220
+
221
+ 3. **Performance Testing**:
222
+ - Benchmark routing performance
223
+ - Evaluate memory usage
224
+ - Test with large numbers of routes
178
225
 
179
226
  ## Implementation Strategy
180
227
 
181
- ### Naming Pattern Rules
182
-
183
- 1. **Interfaces**:
184
- - All interfaces should be prefixed with "I"
185
- - Example: `DomainConfig` `IDomainConfig`
186
-
187
- 2. **Type Aliases**:
188
- - All type aliases should be prefixed with "T"
189
- - Example: `ForwardingType` → `TForwardingType`
190
-
191
- 3. **Enums**:
192
- - Enums should be named in PascalCase without prefix
193
- - Example: `CertificateSource`
194
-
195
- 4. **Backward Compatibility**:
196
- - No Backward compatibility. Remove old names.
197
-
198
- ### Module Implementation Order
199
-
200
- 1. Core module
201
- 2. Certificate module
202
- 3. Forwarding module
203
- 4. Proxy implementations
204
- 5. HTTP & TLS modules
205
- 6. Main exports and entry points
206
-
207
- ### Testing Strategy
208
-
209
- For each module:
210
- 1. Rename interfaces and types
211
- 2. Add backward compatibility aliases
212
- 3. Update imports throughout the module
213
- 4. Run tests to verify functionality
214
- 5. Commit changes module by module
215
-
216
- ## File-Specific Changes
217
-
218
- ### Core Module Files
219
- - `ts/core/models/common-types.ts` - Primary interfaces
220
- - `ts/core/utils/validation-utils.ts` - Validation type definitions
221
- - `ts/core/utils/ip-utils.ts` - IP utility type definitions
222
- - `ts/core/utils/event-utils.ts` - Event type definitions
223
-
224
- ### Certificate Module Files
225
- - `ts/certificate/models/certificate-types.ts` - Certificate interfaces
226
- - `ts/certificate/acme/acme-factory.ts` - ACME factory types
227
- - `ts/certificate/providers/cert-provisioner.ts` - Provider interfaces
228
- - `ts/certificate/storage/file-storage.ts` - Storage interfaces
229
-
230
- ### Forwarding Module Files
231
- - `ts/forwarding/config/forwarding-types.ts` - Forwarding interfaces and types
232
- - `ts/forwarding/config/domain-config.ts` - Domain configuration
233
- - `ts/forwarding/factory/forwarding-factory.ts` - Factory interfaces
234
- - `ts/forwarding/handlers/*.ts` - Handler interfaces
235
-
236
- ### Proxy Module Files
237
- - `ts/proxies/network-proxy/models/types.ts` - NetworkProxy interfaces
238
- - `ts/proxies/smart-proxy/models/interfaces.ts` - SmartProxy interfaces
239
- - `ts/proxies/nftables-proxy/models/interfaces.ts` - NfTables interfaces
240
- - `ts/proxies/smart-proxy/connection-manager.ts` - Connection types
241
-
242
- ### HTTP/TLS Module Files
243
- - `ts/http/models/http-types.ts` - HTTP module interfaces
244
- - `ts/http/port80/acme-interfaces.ts` - ACME interfaces
245
- - `ts/tls/sni/client-hello-parser.ts` - TLS parser types
246
- - `ts/tls/alerts/tls-alert.ts` - TLS alert interfaces
247
-
248
- ## Success Criteria
249
-
250
- - All interfaces are prefixed with "I"
251
- - All type aliases are prefixed with "T"
252
- - All tests pass with new naming conventions
253
- - Documentation is updated with new naming conventions
254
- - Backward compatibility is maintained through type aliases
255
- - Declaration files correctly export both naming conventions
228
+ ### Code Organization
229
+
230
+ 1. **New Files**:
231
+ - `route-config.ts` - Core route interfaces
232
+ - `route-manager.ts` - Route matching and management
233
+ - `route-connection-handler.ts` - Connection handling with routes
234
+ - `route-smart-proxy.ts` - Main SmartProxy implementation
235
+ - `template-engine.ts` - For variable substitution
236
+
237
+ 2. **File Removal**:
238
+ - Remove `port-range-manager.ts`
239
+ - Remove `domain-config-manager.ts`
240
+ - Remove legacy interfaces and adapter code
241
+ - Remove backward compatibility shims
242
+
243
+ ### Transition Strategy
244
+
245
+ 1. **Breaking Change Approach**:
246
+ - This will be a major version update with breaking changes
247
+ - No backward compatibility will be maintained
248
+ - Clear migration documentation will guide users to the new API
249
+
250
+ 2. **Package Structure**:
251
+ - `@push.rocks/smartproxy` package will be updated to v14.0.0
252
+ - Legacy code fully removed, only route-based API exposed
253
+ - Support documentation provided for migration
254
+
255
+ 3. **Migration Documentation**:
256
+ - Provide a migration guide with examples
257
+ - Show equivalent route configurations for common legacy patterns
258
+ - Offer code transformation helpers for complex setups
259
+
260
+ ## Benefits of the Clean Approach
261
+
262
+ 1. **Reduced Complexity**:
263
+ - No overlapping or conflicting configuration systems
264
+ - No dual maintenance of backward compatibility code
265
+ - Simplified internal architecture
266
+
267
+ 2. **Cleaner Code Base**:
268
+ - Removal of technical debt
269
+ - Better separation of concerns
270
+ - More maintainable codebase
271
+
272
+ 3. **Better User Experience**:
273
+ - Consistent, predictable API
274
+ - No confusing overlapping options
275
+ - Clear documentation of one approach, not two
276
+
277
+ 4. **Future-Proof Design**:
278
+ - Easier to extend with new features
279
+ - Better performance without legacy overhead
280
+ - Cleaner foundation for future enhancements
281
+
282
+ ## Migration Support
283
+
284
+ While we're removing backward compatibility from the codebase, we'll provide extensive migration support:
285
+
286
+ 1. **Migration Guide**:
287
+ - Detailed documentation on moving from legacy to route-based config
288
+ - Pattern-matching examples for all common use cases
289
+ - Troubleshooting guide for common migration issues
290
+
291
+ 2. **Conversion Tool**:
292
+ - Provide a standalone one-time conversion tool
293
+ - Takes legacy configuration and outputs route-based equivalents
294
+ - Will not be included in the main package to avoid bloat
295
+
296
+ 3. **Version Policy**:
297
+ - Maintain the legacy version (13.x) for security updates
298
+ - Make the route-based version a clear major version change (14.0.0)
299
+ - Clearly communicate the breaking changes
300
+
301
+ ## Timeline and Versioning
302
+
303
+ 1. **Development**:
304
+ - Develop route-based implementation in a separate branch
305
+ - Complete full test coverage of new implementation
306
+ - Ensure documentation is complete
307
+
308
+ 2. **Release**:
309
+ - Release as version 14.0.0
310
+ - Clearly mark as breaking change
311
+ - Provide migration guide at release time
312
+
313
+ 3. **Support**:
314
+ - Offer extended support for migration questions
315
+ - Consider maintaining security updates for v13.x for 6 months
316
+ - Focus active development on route-based version only
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartproxy',
6
- version: '13.1.2',
7
- description: 'A powerful proxy package that effectively handles high traffic, with features such as SSL/TLS support, port proxying, WebSocket handling, dynamic routing with authentication options, and automatic ACME certificate management.'
6
+ version: '15.0.0',
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
  }
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * SmartProxy implementation
3
+ *
4
+ * Version 14.0.0: Unified Route-Based Configuration API
3
5
  */
4
6
  // Re-export models
5
7
  export * from './models/index.js';
@@ -7,12 +9,26 @@ export * from './models/index.js';
7
9
  // Export the main SmartProxy class
8
10
  export { SmartProxy } from './smart-proxy.js';
9
11
 
10
- // Export supporting classes
12
+ // Export core supporting classes
11
13
  export { ConnectionManager } from './connection-manager.js';
12
14
  export { SecurityManager } from './security-manager.js';
13
- export { DomainConfigManager } from './domain-config-manager.js';
14
15
  export { TimeoutManager } from './timeout-manager.js';
15
16
  export { TlsManager } from './tls-manager.js';
16
17
  export { NetworkProxyBridge } from './network-proxy-bridge.js';
17
- export { PortRangeManager } from './port-range-manager.js';
18
- export { ConnectionHandler } from './connection-handler.js';
18
+
19
+ // Export route-based components
20
+ export { RouteManager } from './route-manager.js';
21
+ export { RouteConnectionHandler } from './route-connection-handler.js';
22
+
23
+ // Export route helpers for configuration
24
+ export {
25
+ createRoute,
26
+ createHttpRoute,
27
+ createHttpsRoute,
28
+ createPassthroughRoute,
29
+ createRedirectRoute,
30
+ createHttpToHttpsRedirect,
31
+ createBlockRoute,
32
+ createLoadBalancerRoute,
33
+ createHttpsServer
34
+ } from './route-helpers.js';
@@ -2,3 +2,7 @@
2
2
  * SmartProxy models
3
3
  */
4
4
  export * from './interfaces.js';
5
+ export * from './route-types.js';
6
+
7
+ // Re-export IRoutedSmartProxyOptions explicitly to avoid ambiguity
8
+ export type { ISmartProxyOptions as IRoutedSmartProxyOptions } from './interfaces.js';