fix(docs, tests, acme): fix: update changelog, documentation, examples and tests for v19.4.0 release. Adjust global ACME configuration to use ssl@bleu.de and add non-privileged port examples.
This commit is contained in:
@ -1,22 +1,15 @@
|
||||
# SmartProxy Architecture Refactoring Plan
|
||||
# SmartProxy v19.4.0 - Completed Refactoring
|
||||
|
||||
## Overview
|
||||
|
||||
Refactor the proxy architecture to provide clearer separation of concerns between HTTP/HTTPS traffic handling and low-level connection routing.
|
||||
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.
|
||||
|
||||
## Current Architecture Problems
|
||||
## Current Architecture (v19.4.0)
|
||||
|
||||
1. NetworkProxy name doesn't clearly indicate it handles HTTP/HTTPS
|
||||
2. HTTP parsing logic is duplicated in RouteConnectionHandler
|
||||
3. Redirect and static route handling is embedded in SmartProxy
|
||||
4. Unclear separation between TCP routing and HTTP processing
|
||||
|
||||
## Proposed Architecture
|
||||
|
||||
### HttpProxy (renamed from NetworkProxy)
|
||||
### HttpProxy (formerly NetworkProxy)
|
||||
**Purpose**: Handle all HTTP/HTTPS traffic with TLS termination
|
||||
|
||||
**Responsibilities**:
|
||||
**Current Responsibilities**:
|
||||
- TLS termination for HTTPS
|
||||
- HTTP/1.1 and HTTP/2 protocol handling
|
||||
- HTTP request/response parsing
|
||||
@ -25,29 +18,33 @@ Refactor the proxy architecture to provide clearer separation of concerns betwee
|
||||
- Static route handlers
|
||||
- WebSocket protocol upgrades
|
||||
- Connection pooling for backend servers
|
||||
- Certificate management (ACME and static)
|
||||
- Certificate management integration
|
||||
|
||||
### SmartProxy
|
||||
**Purpose**: Low-level connection router and port manager
|
||||
**Purpose**: Central API for all proxy needs with route-based configuration
|
||||
|
||||
**Responsibilities**:
|
||||
**Current Responsibilities**:
|
||||
- Port management (listen on multiple ports)
|
||||
- Route-based connection routing
|
||||
- TLS passthrough (SNI-based routing)
|
||||
- NFTables integration
|
||||
- Delegate HTTP/HTTPS connections to HttpProxy
|
||||
- Certificate management via SmartCertManager
|
||||
- Raw TCP proxying
|
||||
- Connection lifecycle management
|
||||
- Global ACME configuration (v19+)
|
||||
|
||||
## Implementation Plan
|
||||
## Completed Implementation
|
||||
|
||||
### Phase 1: Rename and Reorganize NetworkProxy ✅
|
||||
### Phase 1: Rename and Reorganize ✅
|
||||
- NetworkProxy renamed to HttpProxy
|
||||
- Directory structure reorganized
|
||||
- All imports and references updated
|
||||
|
||||
1. **Rename NetworkProxy to HttpProxy**
|
||||
- Renamed directory from `network-proxy` to `http-proxy`
|
||||
- Updated all imports and references
|
||||
|
||||
2. **Update class and file names**
|
||||
### Phase 2: Certificate Management ✅
|
||||
- Unified certificate management in SmartCertManager
|
||||
- Global ACME configuration support (v19+)
|
||||
- Route-level certificate overrides
|
||||
- Automatic renewal system
|
||||
- Renamed `network-proxy.ts` to `http-proxy.ts`
|
||||
- Updated `NetworkProxy` class to `HttpProxy` class
|
||||
- Updated all type definitions and interfaces
|
||||
@ -157,16 +154,26 @@ After this refactoring, we can more easily add:
|
||||
4. Protocol-specific optimizations
|
||||
5. Better HTTP/2 multiplexing
|
||||
|
||||
## Breaking Changes
|
||||
## Breaking Changes from v18 to v19
|
||||
|
||||
1. `NetworkProxy` class renamed to `HttpProxy`
|
||||
2. Import paths change from `network-proxy` to `http-proxy`
|
||||
3. Some type names may change for consistency
|
||||
3. Global ACME configuration now available at the top level
|
||||
4. Certificate management unified under SmartCertManager
|
||||
|
||||
## Rollback Plan
|
||||
## Future Enhancements
|
||||
|
||||
If issues arise:
|
||||
1. Git revert to previous commit
|
||||
2. Re-deploy previous version
|
||||
3. Document lessons learned
|
||||
4. Plan incremental changes
|
||||
1. HTTP/3 (QUIC) support in HttpProxy
|
||||
2. Advanced HTTP features (compression, caching)
|
||||
3. HTTP middleware system
|
||||
4. Protocol-specific optimizations
|
||||
5. Better HTTP/2 multiplexing
|
||||
6. Enhanced monitoring and metrics
|
||||
|
||||
## Key Features in v19.4.0
|
||||
|
||||
1. **Global ACME Configuration**: Default settings for all routes with `certificate: 'auto'`
|
||||
2. **Enhanced Route Management**: Better separation between routing and certificate management
|
||||
3. **Improved Test Coverage**: Fixed test exports and port bindings
|
||||
4. **Better Error Messages**: Clear guidance for ACME configuration issues
|
||||
5. **Non-Privileged Port Support**: Examples for development environments
|
Reference in New Issue
Block a user