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:
29
readme.md
29
readme.md
@ -113,7 +113,7 @@ npm install @push.rocks/smartproxy
|
||||
|
||||
## Quick Start with SmartProxy
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
```typescript
|
||||
import {
|
||||
@ -136,10 +136,12 @@ import {
|
||||
const proxy = new SmartProxy({
|
||||
// Global ACME settings for all routes with certificate: 'auto'
|
||||
acme: {
|
||||
email: 'ssl@example.com', // Required for Let's Encrypt
|
||||
email: 'ssl@bleu.de', // Required for Let's Encrypt
|
||||
useProduction: false, // Use staging by default
|
||||
renewThresholdDays: 30, // Renew 30 days before expiry
|
||||
port: 80 // Port for HTTP-01 challenges
|
||||
port: 80, // Port for HTTP-01 challenges (use 8080 for non-privileged)
|
||||
autoRenew: true, // Enable automatic renewal
|
||||
renewCheckIntervalHours: 24 // Check for renewals daily
|
||||
},
|
||||
|
||||
// Define all your routing rules in a single array
|
||||
@ -216,26 +218,7 @@ const proxy = new SmartProxy({
|
||||
certificate: 'auto',
|
||||
maxRate: '100mbps'
|
||||
})
|
||||
],
|
||||
|
||||
// Global settings that apply to all routes
|
||||
defaults: {
|
||||
security: {
|
||||
maxConnections: 500
|
||||
}
|
||||
},
|
||||
|
||||
// Automatic Let's Encrypt integration
|
||||
acme: {
|
||||
enabled: true,
|
||||
contactEmail: 'admin@example.com',
|
||||
useProduction: true
|
||||
}
|
||||
});
|
||||
|
||||
// Listen for certificate events
|
||||
proxy.on('certificate', evt => {
|
||||
console.log(`Certificate for ${evt.domain} ready, expires: ${evt.expiryDate}`);
|
||||
]
|
||||
});
|
||||
|
||||
// Start the proxy
|
||||
|
Reference in New Issue
Block a user