Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
aa70dcc299 | |||
adb85d920f | |||
2e4c6312cd | |||
9b773608c7 |
12
changelog.md
12
changelog.md
@ -1,5 +1,17 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-05-05 - 10.0.9 - fix(documentation)
|
||||||
|
Update documentation to use 'certProviderFunction' instead of 'certProvider' in SmartProxy settings.
|
||||||
|
|
||||||
|
- Renamed 'certProvider' to 'certProviderFunction' in README examples and configuration options.
|
||||||
|
- Ensured consistency in the configuration section of the documentation.
|
||||||
|
|
||||||
|
## 2025-05-05 - 10.0.8 - fix(smartproxy)
|
||||||
|
rename certProvider to certProvisionFunction in certificate provisioning interfaces and SmartProxy
|
||||||
|
|
||||||
|
- In ts/smartproxy/classes.pp.interfaces.ts, renamed the optional property 'certProvider' to 'certProvisionFunction'.
|
||||||
|
- In ts/smartproxy/classes.smartproxy.ts, updated references from this.settings.certProvider to this.settings.certProvisionFunction.
|
||||||
|
|
||||||
## 2025-05-04 - 10.0.7 - fix(core)
|
## 2025-05-04 - 10.0.7 - fix(core)
|
||||||
refactor: Rename IPortProxySettings to ISmartProxyOptions in internal modules
|
refactor: Rename IPortProxySettings to ISmartProxyOptions in internal modules
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/smartproxy",
|
"name": "@push.rocks/smartproxy",
|
||||||
"version": "10.0.7",
|
"version": "10.0.9",
|
||||||
"private": false,
|
"private": false,
|
||||||
"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.",
|
"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.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -384,7 +384,7 @@ Listen for certificate events via EventEmitter:
|
|||||||
- **SmartProxy**:
|
- **SmartProxy**:
|
||||||
- `certificate` (domain, publicKey, privateKey, expiryDate, source, isRenewal)
|
- `certificate` (domain, publicKey, privateKey, expiryDate, source, isRenewal)
|
||||||
|
|
||||||
Provide a `certProvider(domain)` in SmartProxy settings to supply static certs or return `'http01'`.
|
Provide a `certProviderFunction(domain)` in SmartProxy settings to supply static certs or return `'http01'`.
|
||||||
|
|
||||||
## Configuration Options
|
## Configuration Options
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ Provide a `certProvider(domain)` in SmartProxy settings to supply static certs o
|
|||||||
- `sniEnabled`, `defaultAllowedIPs`, `preserveSourceIP` (booleans)
|
- `sniEnabled`, `defaultAllowedIPs`, `preserveSourceIP` (booleans)
|
||||||
- Timeouts: `initialDataTimeout`, `socketTimeout`, `inactivityTimeout`, etc.
|
- Timeouts: `initialDataTimeout`, `socketTimeout`, `inactivityTimeout`, etc.
|
||||||
- Socket opts: `noDelay`, `keepAlive`, `enableKeepAliveProbes`
|
- Socket opts: `noDelay`, `keepAlive`, `enableKeepAliveProbes`
|
||||||
- `acme` (IAcmeOptions), `certProvider` (callback)
|
- `acme` (IAcmeOptions), `certProviderFunction` (callback)
|
||||||
- `useNetworkProxy` (number[]), `networkProxyPort` (number)
|
- `useNetworkProxy` (number[]), `networkProxyPort` (number)
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartproxy',
|
name: '@push.rocks/smartproxy',
|
||||||
version: '10.0.7',
|
version: '10.0.9',
|
||||||
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.'
|
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.'
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ export interface ISmartProxyOptions {
|
|||||||
* Optional certificate provider callback. Return 'http01' to use HTTP-01 challenges,
|
* Optional certificate provider callback. Return 'http01' to use HTTP-01 challenges,
|
||||||
* or a static certificate object for immediate provisioning.
|
* or a static certificate object for immediate provisioning.
|
||||||
*/
|
*/
|
||||||
certProvider?: (domain: string) => Promise<ISmartProxyCertProvisionObject>;
|
certProvisionFunction?: (domain: string) => Promise<ISmartProxyCertProvisionObject>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -165,7 +165,7 @@ export class SmartProxy extends plugins.EventEmitter {
|
|||||||
this.settings.domainConfigs,
|
this.settings.domainConfigs,
|
||||||
this.port80Handler,
|
this.port80Handler,
|
||||||
this.networkProxyBridge,
|
this.networkProxyBridge,
|
||||||
this.settings.certProvider,
|
this.settings.certProvisionFunction,
|
||||||
acme.renewThresholdDays!,
|
acme.renewThresholdDays!,
|
||||||
acme.renewCheckIntervalHours!,
|
acme.renewCheckIntervalHours!,
|
||||||
acme.autoRenew!,
|
acme.autoRenew!,
|
||||||
@ -393,9 +393,9 @@ export class SmartProxy extends plugins.EventEmitter {
|
|||||||
for (const domain of domainConfig.domains) {
|
for (const domain of domainConfig.domains) {
|
||||||
if (domain.includes('*')) continue;
|
if (domain.includes('*')) continue;
|
||||||
let provision = 'http01' as string | plugins.tsclass.network.ICert;
|
let provision = 'http01' as string | plugins.tsclass.network.ICert;
|
||||||
if (this.settings.certProvider) {
|
if (this.settings.certProvisionFunction) {
|
||||||
try {
|
try {
|
||||||
provision = await this.settings.certProvider(domain);
|
provision = await this.settings.certProvisionFunction(domain);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(`certProvider error for ${domain}: ${err}`);
|
console.log(`certProvider error for ${domain}: ${err}`);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user