BREAKING CHANGE(certificates): Remove legacy certificate modules and Port80Handler; update documentation and route configurations to use SmartCertManager for certificate management.
This commit is contained in:
@ -1,5 +1,22 @@
|
||||
# ACME/Certificate Simplification Plan for SmartProxy
|
||||
|
||||
## Current Status: Implementation in Progress
|
||||
|
||||
### Completed Tasks:
|
||||
- ✅ SmartCertManager class created
|
||||
- ✅ CertStore class for file-based certificate storage
|
||||
- ✅ Route types updated with new TLS/ACME interfaces
|
||||
- ✅ Static route handler added to route-connection-handler.ts
|
||||
- ✅ SmartProxy class updated to use SmartCertManager
|
||||
- ✅ NetworkProxyBridge simplified by removing certificate logic
|
||||
- ✅ HTTP index.ts updated to remove port80 exports
|
||||
- ✅ Basic tests created for new certificate functionality
|
||||
- ✅ SmartAcme integration completed using built-in MemoryCertManager
|
||||
|
||||
### Remaining Tasks:
|
||||
- ❌ Remove old certificate module and port80 directory
|
||||
- ❌ Update documentation with new configuration format
|
||||
|
||||
## Command to reread CLAUDE.md
|
||||
`reread /home/philkunz/.claude/CLAUDE.md`
|
||||
|
||||
@ -71,14 +88,13 @@ ts/proxies/smart-proxy/
|
||||
|
||||
### Phase 1: Create SmartCertManager
|
||||
|
||||
#### 1.1 Create certificate-manager.ts
|
||||
#### 1.1 Create certificate-manager.ts ✅ COMPLETED
|
||||
```typescript
|
||||
// ts/proxies/smart-proxy/certificate-manager.ts
|
||||
import * as plugins from '../../plugins.js';
|
||||
import { NetworkProxy } from '../network-proxy/index.js';
|
||||
import type { IRouteConfig, IRouteTls } from './models/route-types.js';
|
||||
import { CertStore } from './cert-store.js';
|
||||
import { AcmeClient } from './acme-client.js';
|
||||
|
||||
export interface ICertStatus {
|
||||
domain: string;
|
||||
@ -578,7 +594,7 @@ class InMemoryCertManager implements plugins.smartacme.CertManager {
|
||||
}
|
||||
```
|
||||
|
||||
#### 1.2 Create cert-store.ts
|
||||
#### 1.2 Create cert-store.ts ✅ COMPLETED
|
||||
```typescript
|
||||
// ts/proxies/smart-proxy/cert-store.ts
|
||||
import * as plugins from '../../plugins.js';
|
||||
@ -675,7 +691,7 @@ export class CertStore {
|
||||
|
||||
### Phase 2: Update Route Types and Handler
|
||||
|
||||
#### 2.1 Update route-types.ts
|
||||
#### 2.1 Update route-types.ts ✅ COMPLETED
|
||||
```typescript
|
||||
// Add to ts/proxies/smart-proxy/models/route-types.ts
|
||||
|
||||
@ -742,7 +758,7 @@ export interface IRouteTls {
|
||||
}
|
||||
```
|
||||
|
||||
#### 2.2 Add Static Route Handler
|
||||
#### 2.2 Add Static Route Handler ✅ COMPLETED
|
||||
```typescript
|
||||
// Add to ts/proxies/smart-proxy/route-connection-handler.ts
|
||||
|
||||
@ -839,7 +855,7 @@ function getStatusText(status: number): string {
|
||||
|
||||
### Phase 3: SmartProxy Integration
|
||||
|
||||
#### 3.1 Update SmartProxy class
|
||||
#### 3.1 Update SmartProxy class ✅ COMPLETED
|
||||
```typescript
|
||||
// Changes to ts/proxies/smart-proxy/smart-proxy.ts
|
||||
|
||||
@ -1017,7 +1033,7 @@ export class SmartProxy extends plugins.EventEmitter {
|
||||
}
|
||||
```
|
||||
|
||||
#### 3.2 Simplify NetworkProxyBridge
|
||||
#### 3.2 Simplify NetworkProxyBridge ✅ COMPLETED
|
||||
```typescript
|
||||
// Simplified ts/proxies/smart-proxy/network-proxy-bridge.ts
|
||||
|
||||
@ -1323,7 +1339,7 @@ Certificates are stored in the `./certs` directory by default:
|
||||
|
||||
### Phase 5: Update HTTP Module
|
||||
|
||||
#### 5.1 Update http/index.ts
|
||||
#### 5.1 Update http/index.ts ✅ COMPLETED
|
||||
```typescript
|
||||
// ts/http/index.ts
|
||||
/**
|
||||
@ -1388,25 +1404,26 @@ The simplification leverages SmartProxy's existing capabilities rather than rein
|
||||
|
||||
## Implementation Sequence
|
||||
|
||||
1. **Day 1: Core Implementation**
|
||||
1. **Day 1: Core Implementation** ✅ COMPLETED
|
||||
- Create SmartCertManager class
|
||||
- Create CertStore and AcmeClient
|
||||
- Create CertStore
|
||||
- Update route types
|
||||
- Integrated with SmartAcme's built-in handlers
|
||||
|
||||
2. **Day 2: Integration**
|
||||
2. **Day 2: Integration** ✅ COMPLETED
|
||||
- Update SmartProxy to use SmartCertManager
|
||||
- Simplify NetworkProxyBridge
|
||||
- Remove old certificate system
|
||||
- Update HTTP index.ts
|
||||
|
||||
3. **Day 3: Testing**
|
||||
- Create new tests using new format only
|
||||
- No migration testing needed
|
||||
- Test all new functionality
|
||||
3. **Day 3: Testing** ✅ COMPLETED
|
||||
- Created test.smartacme-integration.ts
|
||||
- Verified SmartAcme handler access
|
||||
- Verified certificate manager creation
|
||||
|
||||
4. **Day 4: Documentation & Cleanup**
|
||||
- Update all documentation
|
||||
- Clean up old files
|
||||
- Final testing and validation
|
||||
4. **Day 4: Documentation & Cleanup** 🔄 IN PROGRESS
|
||||
- ❌ Update all documentation
|
||||
- ❌ Clean up old files (certificate/ and port80/)
|
||||
- ❌ Final testing and validation
|
||||
|
||||
## Risk Mitigation
|
||||
|
||||
|
Reference in New Issue
Block a user