@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.
- package/dist_ts/00_commitinfo_data.js +3 -3
- package/dist_ts/proxies/smart-proxy/index.d.ts +5 -3
- package/dist_ts/proxies/smart-proxy/index.js +9 -5
- package/dist_ts/proxies/smart-proxy/models/index.d.ts +2 -0
- package/dist_ts/proxies/smart-proxy/models/index.js +2 -1
- package/dist_ts/proxies/smart-proxy/models/interfaces.d.ts +82 -15
- package/dist_ts/proxies/smart-proxy/models/interfaces.js +10 -1
- package/dist_ts/proxies/smart-proxy/models/route-types.d.ts +133 -0
- package/dist_ts/proxies/smart-proxy/models/route-types.js +2 -0
- package/dist_ts/proxies/smart-proxy/route-connection-handler.d.ts +55 -0
- package/dist_ts/proxies/smart-proxy/route-connection-handler.js +804 -0
- package/dist_ts/proxies/smart-proxy/route-helpers.d.ts +127 -0
- package/dist_ts/proxies/smart-proxy/route-helpers.js +196 -0
- package/dist_ts/proxies/smart-proxy/route-manager.d.ts +103 -0
- package/dist_ts/proxies/smart-proxy/route-manager.js +483 -0
- package/dist_ts/proxies/smart-proxy/smart-proxy.d.ts +19 -8
- package/dist_ts/proxies/smart-proxy/smart-proxy.js +239 -46
- package/package.json +2 -2
- package/readme.md +863 -423
- package/readme.plan.md +311 -250
- package/ts/00_commitinfo_data.ts +2 -2
- package/ts/proxies/smart-proxy/index.ts +20 -4
- package/ts/proxies/smart-proxy/models/index.ts +4 -0
- package/ts/proxies/smart-proxy/models/interfaces.ts +91 -13
- package/ts/proxies/smart-proxy/models/route-types.ts +184 -0
- package/ts/proxies/smart-proxy/route-connection-handler.ts +1117 -0
- package/ts/proxies/smart-proxy/route-helpers.ts +344 -0
- package/ts/proxies/smart-proxy/route-manager.ts +587 -0
- package/ts/proxies/smart-proxy/smart-proxy.ts +300 -69
package/readme.plan.md
CHANGED
|
@@ -1,255 +1,316 @@
|
|
|
1
|
-
# SmartProxy
|
|
1
|
+
# SmartProxy Fully Unified Configuration Plan (Updated)
|
|
2
2
|
|
|
3
3
|
## Project Goal
|
|
4
|
-
|
|
5
|
-
1.
|
|
6
|
-
2.
|
|
7
|
-
3.
|
|
8
|
-
4.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
###
|
|
182
|
-
|
|
183
|
-
1. **
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
-
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
-
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
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
|
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: '
|
|
7
|
-
description: 'A powerful proxy package
|
|
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
|
-
|
|
18
|
-
|
|
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';
|