fix(docs): Update README: rename certProviderFunction to certProvisionFunction in configuration options for consistency.
This commit is contained in:
parent
aa70dcc299
commit
a646f4ad28
@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-05-05 - 10.0.10 - fix(docs)
|
||||
Update README: rename certProviderFunction to certProvisionFunction in configuration options for consistency.
|
||||
|
||||
- Replaced 'certProviderFunction' with 'certProvisionFunction' in the docs to reflect the updated API.
|
||||
- Ensured all references in the readme are consistent with the new naming convention.
|
||||
|
||||
## 2025-05-05 - 10.0.9 - fix(documentation)
|
||||
Update documentation to use 'certProviderFunction' instead of 'certProvider' in SmartProxy settings.
|
||||
|
||||
|
@ -384,7 +384,7 @@ Listen for certificate events via EventEmitter:
|
||||
- **SmartProxy**:
|
||||
- `certificate` (domain, publicKey, privateKey, expiryDate, source, isRenewal)
|
||||
|
||||
Provide a `certProviderFunction(domain)` in SmartProxy settings to supply static certs or return `'http01'`.
|
||||
Provide a `certProvisionFunction(domain)` in SmartProxy settings to supply static certs or return `'http01'`.
|
||||
|
||||
## Configuration Options
|
||||
|
||||
@ -429,7 +429,7 @@ Provide a `certProviderFunction(domain)` in SmartProxy settings to supply static
|
||||
- `sniEnabled`, `defaultAllowedIPs`, `preserveSourceIP` (booleans)
|
||||
- Timeouts: `initialDataTimeout`, `socketTimeout`, `inactivityTimeout`, etc.
|
||||
- Socket opts: `noDelay`, `keepAlive`, `enableKeepAliveProbes`
|
||||
- `acme` (IAcmeOptions), `certProviderFunction` (callback)
|
||||
- `acme` (IAcmeOptions), `certProvisionFunction` (callback)
|
||||
- `useNetworkProxy` (number[]), `networkProxyPort` (number)
|
||||
|
||||
## Troubleshooting
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartproxy',
|
||||
version: '10.0.9',
|
||||
version: '10.0.10',
|
||||
description: 'A powerful proxy package that effectively handles high traffic, with features such as SSL/TLS support, port proxying, WebSocket handling, dynamic routing with authentication options, and automatic ACME certificate management.'
|
||||
}
|
||||
|
@ -77,9 +77,9 @@ export interface IDomainForwardConfig {
|
||||
* Unified ACME configuration options used across proxies and handlers
|
||||
*/
|
||||
export interface IAcmeOptions {
|
||||
accountEmail?: string; // Email for Let's Encrypt account
|
||||
enabled?: boolean; // Whether ACME is enabled
|
||||
port?: number; // Port to listen on for ACME challenges (default: 80)
|
||||
contactEmail?: string; // Email for Let's Encrypt account
|
||||
useProduction?: boolean; // Use production environment (default: staging)
|
||||
httpsRedirectPort?: number; // Port to redirect HTTP requests to HTTPS (default: 443)
|
||||
renewThresholdDays?: number; // Days before expiry to renew certificates
|
||||
|
@ -357,7 +357,7 @@ export class CertificateManager {
|
||||
// Build and configure Port80Handler
|
||||
this.port80Handler = buildPort80Handler({
|
||||
port: this.options.acme.port,
|
||||
contactEmail: this.options.acme.contactEmail,
|
||||
accountEmail: this.options.acme.accountEmail,
|
||||
useProduction: this.options.acme.useProduction,
|
||||
httpsRedirectPort: this.options.port, // Redirect to our HTTPS port
|
||||
enabled: this.options.acme.enabled,
|
||||
|
@ -76,7 +76,7 @@ export class NetworkProxy implements IMetricsTracker {
|
||||
acme: {
|
||||
enabled: optionsArg.acme?.enabled || false,
|
||||
port: optionsArg.acme?.port || 80,
|
||||
contactEmail: optionsArg.acme?.contactEmail || 'admin@example.com',
|
||||
accountEmail: optionsArg.acme?.accountEmail || 'admin@example.com',
|
||||
useProduction: optionsArg.acme?.useProduction || false, // Default to staging for safety
|
||||
renewThresholdDays: optionsArg.acme?.renewThresholdDays || 30,
|
||||
autoRenew: optionsArg.acme?.autoRenew !== false, // Default to true
|
||||
|
@ -101,7 +101,7 @@ export class Port80Handler extends plugins.EventEmitter {
|
||||
// Default options
|
||||
this.options = {
|
||||
port: options.port ?? 80,
|
||||
contactEmail: options.contactEmail ?? 'admin@example.com',
|
||||
accountEmail: options.accountEmail ?? 'admin@example.com',
|
||||
useProduction: options.useProduction ?? false, // Safer default: staging
|
||||
httpsRedirectPort: options.httpsRedirectPort ?? 443,
|
||||
enabled: options.enabled ?? true, // Enable by default
|
||||
@ -134,7 +134,7 @@ export class Port80Handler extends plugins.EventEmitter {
|
||||
// Initialize SmartAcme for ACME challenge management (diskless HTTP handler)
|
||||
if (this.options.enabled) {
|
||||
this.smartAcme = new plugins.smartacme.SmartAcme({
|
||||
accountEmail: this.options.contactEmail,
|
||||
accountEmail: this.options.accountEmail,
|
||||
certManager: new plugins.smartacme.MemoryCertManager(),
|
||||
environment: this.options.useProduction ? 'production' : 'integration',
|
||||
challengeHandlers: [ new DisklessHttp01Handler(this.acmeHttp01Storage) ],
|
||||
|
@ -78,7 +78,7 @@ export class SmartProxy extends plugins.EventEmitter {
|
||||
this.settings.acme = {
|
||||
enabled: false,
|
||||
port: 80,
|
||||
contactEmail: 'admin@example.com',
|
||||
accountEmail: 'admin@example.com',
|
||||
useProduction: false,
|
||||
renewThresholdDays: 30,
|
||||
autoRenew: true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user