@push.rocks/smartproxy 19.3.3 → 19.3.4

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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartproxy',
6
- version: '19.3.3',
6
+ version: '19.3.4',
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=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@push.rocks/smartproxy",
3
- "version": "19.3.3",
3
+ "version": "19.3.4",
4
4
  "private": false,
5
5
  "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.",
6
6
  "main": "dist_ts/index.js",
package/readme.md CHANGED
@@ -113,7 +113,7 @@ npm install @push.rocks/smartproxy
113
113
 
114
114
  ## Quick Start with SmartProxy
115
115
 
116
- SmartProxy v18.0.0 continues the evolution of the unified route-based configuration system making your proxy setup more flexible and intuitive with improved helper functions and NFTables integration for high-performance kernel-level routing.
116
+ SmartProxy v19.4.0 provides a unified route-based configuration system with enhanced certificate management, NFTables integration for high-performance kernel-level routing, and improved helper functions for common proxy setups.
117
117
 
118
118
  ```typescript
119
119
  import {
@@ -136,10 +136,12 @@ import {
136
136
  const proxy = new SmartProxy({
137
137
  // Global ACME settings for all routes with certificate: 'auto'
138
138
  acme: {
139
- email: 'ssl@example.com', // Required for Let's Encrypt
139
+ email: 'ssl@bleu.de', // Required for Let's Encrypt
140
140
  useProduction: false, // Use staging by default
141
141
  renewThresholdDays: 30, // Renew 30 days before expiry
142
- port: 80 // Port for HTTP-01 challenges
142
+ port: 80, // Port for HTTP-01 challenges (use 8080 for non-privileged)
143
+ autoRenew: true, // Enable automatic renewal
144
+ renewCheckIntervalHours: 24 // Check for renewals daily
143
145
  },
144
146
 
145
147
  // Define all your routing rules in a single array
@@ -216,26 +218,7 @@ const proxy = new SmartProxy({
216
218
  certificate: 'auto',
217
219
  maxRate: '100mbps'
218
220
  })
219
- ],
220
-
221
- // Global settings that apply to all routes
222
- defaults: {
223
- security: {
224
- maxConnections: 500
225
- }
226
- },
227
-
228
- // Automatic Let's Encrypt integration
229
- acme: {
230
- enabled: true,
231
- contactEmail: 'admin@example.com',
232
- useProduction: true
233
- }
234
- });
235
-
236
- // Listen for certificate events
237
- proxy.on('certificate', evt => {
238
- console.log(`Certificate for ${evt.domain} ready, expires: ${evt.expiryDate}`);
221
+ ]
239
222
  });
240
223
 
241
224
  // Start the proxy
package/readme.plan.md CHANGED
@@ -1,22 +1,15 @@
1
- # SmartProxy Architecture Refactoring Plan
1
+ # SmartProxy v19.4.0 - Completed Refactoring
2
2
 
3
3
  ## Overview
4
4
 
5
- Refactor the proxy architecture to provide clearer separation of concerns between HTTP/HTTPS traffic handling and low-level connection routing.
5
+ SmartProxy has been successfully refactored with clearer separation of concerns between HTTP/HTTPS traffic handling and low-level connection routing. Version 19.4.0 introduces global ACME configuration and enhanced route management.
6
6
 
7
- ## Current Architecture Problems
7
+ ## Current Architecture (v19.4.0)
8
8
 
9
- 1. NetworkProxy name doesn't clearly indicate it handles HTTP/HTTPS
10
- 2. HTTP parsing logic is duplicated in RouteConnectionHandler
11
- 3. Redirect and static route handling is embedded in SmartProxy
12
- 4. Unclear separation between TCP routing and HTTP processing
13
-
14
- ## Proposed Architecture
15
-
16
- ### HttpProxy (renamed from NetworkProxy)
9
+ ### HttpProxy (formerly NetworkProxy)
17
10
  **Purpose**: Handle all HTTP/HTTPS traffic with TLS termination
18
11
 
19
- **Responsibilities**:
12
+ **Current Responsibilities**:
20
13
  - TLS termination for HTTPS
21
14
  - HTTP/1.1 and HTTP/2 protocol handling
22
15
  - HTTP request/response parsing
@@ -25,29 +18,33 @@ Refactor the proxy architecture to provide clearer separation of concerns betwee
25
18
  - Static route handlers
26
19
  - WebSocket protocol upgrades
27
20
  - Connection pooling for backend servers
28
- - Certificate management (ACME and static)
21
+ - Certificate management integration
29
22
 
30
23
  ### SmartProxy
31
- **Purpose**: Low-level connection router and port manager
24
+ **Purpose**: Central API for all proxy needs with route-based configuration
32
25
 
33
- **Responsibilities**:
26
+ **Current Responsibilities**:
34
27
  - Port management (listen on multiple ports)
35
28
  - Route-based connection routing
36
29
  - TLS passthrough (SNI-based routing)
37
30
  - NFTables integration
38
- - Delegate HTTP/HTTPS connections to HttpProxy
31
+ - Certificate management via SmartCertManager
39
32
  - Raw TCP proxying
40
33
  - Connection lifecycle management
34
+ - Global ACME configuration (v19+)
41
35
 
42
- ## Implementation Plan
43
-
44
- ### Phase 1: Rename and Reorganize NetworkProxy ✅
36
+ ## Completed Implementation
45
37
 
46
- 1. **Rename NetworkProxy to HttpProxy**
47
- - Renamed directory from `network-proxy` to `http-proxy`
48
- - Updated all imports and references
38
+ ### Phase 1: Rename and Reorganize
39
+ - NetworkProxy renamed to HttpProxy
40
+ - Directory structure reorganized
41
+ - All imports and references updated
49
42
 
50
- 2. **Update class and file names**
43
+ ### Phase 2: Certificate Management
44
+ - Unified certificate management in SmartCertManager
45
+ - Global ACME configuration support (v19+)
46
+ - Route-level certificate overrides
47
+ - Automatic renewal system
51
48
  - Renamed `network-proxy.ts` to `http-proxy.ts`
52
49
  - Updated `NetworkProxy` class to `HttpProxy` class
53
50
  - Updated all type definitions and interfaces
@@ -157,16 +154,26 @@ After this refactoring, we can more easily add:
157
154
  4. Protocol-specific optimizations
158
155
  5. Better HTTP/2 multiplexing
159
156
 
160
- ## Breaking Changes
157
+ ## Breaking Changes from v18 to v19
161
158
 
162
159
  1. `NetworkProxy` class renamed to `HttpProxy`
163
160
  2. Import paths change from `network-proxy` to `http-proxy`
164
- 3. Some type names may change for consistency
161
+ 3. Global ACME configuration now available at the top level
162
+ 4. Certificate management unified under SmartCertManager
163
+
164
+ ## Future Enhancements
165
+
166
+ 1. HTTP/3 (QUIC) support in HttpProxy
167
+ 2. Advanced HTTP features (compression, caching)
168
+ 3. HTTP middleware system
169
+ 4. Protocol-specific optimizations
170
+ 5. Better HTTP/2 multiplexing
171
+ 6. Enhanced monitoring and metrics
165
172
 
166
- ## Rollback Plan
173
+ ## Key Features in v19.4.0
167
174
 
168
- If issues arise:
169
- 1. Git revert to previous commit
170
- 2. Re-deploy previous version
171
- 3. Document lessons learned
172
- 4. Plan incremental changes
175
+ 1. **Global ACME Configuration**: Default settings for all routes with `certificate: 'auto'`
176
+ 2. **Enhanced Route Management**: Better separation between routing and certificate management
177
+ 3. **Improved Test Coverage**: Fixed test exports and port bindings
178
+ 4. **Better Error Messages**: Clear guidance for ACME configuration issues
179
+ 5. **Non-Privileged Port Support**: Examples for development environments
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartproxy',
6
- version: '19.3.3',
6
+ version: '19.3.4',
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
  }