From e1a25b749c6a97a7ddc1facc5cbd892b659838ab Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 9 May 2025 22:52:57 +0000 Subject: [PATCH] fix(docs): Update readme to reflect updated interface and type naming conventions --- changelog.md | 7 +++++++ readme.md | 42 ++++++++++++++++++++-------------------- ts/00_commitinfo_data.ts | 2 +- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/changelog.md b/changelog.md index 71d8b7b..a7b7ee2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2025-05-09 - 13.1.2 - fix(docs) +Update readme to reflect updated interface and type naming conventions + +- Changed 'Interfaces' section to 'Interfaces and Types' with updated file references +- Replaced 'SmartProxyOptions', 'AcmeOptions', 'ForwardConfig' with their new names 'ISmartProxyOptions', 'IAcmeOptions', 'IForwardConfig', etc. +- Clarified API reference and project architecture documentation + ## 2025-05-09 - 13.1.1 - fix(typescript) Refactor types and interfaces to use consistent 'I' prefix and update related tests diff --git a/readme.md b/readme.md index fb8e80b..c826364 100644 --- a/readme.md +++ b/readme.md @@ -73,12 +73,12 @@ The following classes and interfaces are provided: - **ValidationUtils** (`ts/core/utils/validation-utils.ts`) for domain, port, and configuration validation - **IpUtils** (`ts/core/utils/ip-utils.ts`) for IP address validation and filtering -- **Interfaces** - - `SmartProxyOptions`, `DomainConfig` (`ts/proxies/smart-proxy/models/interfaces.ts`) - - `NetworkProxyOptions` (`ts/proxies/network-proxy/models/types.ts`) - - `AcmeOptions`, `DomainOptions` (`ts/core/models/common-types.ts`) - - `NfTableProxySettings` (`ts/proxies/nftables-proxy/models/interfaces.ts`) - - `ForwardConfig`, `ForwardingType` (`ts/forwarding/config/forwarding-types.ts`) +- **Interfaces and Types** + - `ISmartProxyOptions`, `IDomainConfig` (`ts/proxies/smart-proxy/models/interfaces.ts`) + - `INetworkProxyOptions` (`ts/proxies/network-proxy/models/types.ts`) + - `IAcmeOptions`, `IDomainOptions` (`ts/certificate/models/certificate-types.ts`) + - `INfTableProxySettings` (`ts/proxies/nftables-proxy/models/interfaces.ts`) + - `IForwardConfig`, `TForwardingType` (`ts/forwarding/config/forwarding-types.ts`) ## Installation Install via npm: @@ -256,11 +256,11 @@ const globPatterns = IpUtils.cidrToGlobPatterns('10.0.0.0/24'); ## API Reference For full configuration options and type definitions, see the TypeScript interfaces: -- `NetworkProxyOptions` (`ts/proxies/network-proxy/models/types.ts`) -- `AcmeOptions`, `DomainOptions` (`ts/core/models/common-types.ts`) -- `ForwardConfig` (`ts/forwarding/config/forwarding-types.ts`) -- `NfTableProxySettings` (`ts/proxies/nftables-proxy/models/interfaces.ts`) -- `SmartProxyOptions`, `DomainConfig` (`ts/proxies/smart-proxy/models/interfaces.ts`) +- `INetworkProxyOptions` (`ts/proxies/network-proxy/models/types.ts`) +- `IAcmeOptions`, `IDomainOptions` (`ts/certificate/models/certificate-types.ts`) +- `IForwardConfig` (`ts/forwarding/config/forwarding-types.ts`) +- `INfTableProxySettings` (`ts/proxies/nftables-proxy/models/interfaces.ts`) +- `ISmartProxyOptions`, `IDomainConfig` (`ts/proxies/smart-proxy/models/interfaces.ts`) ## Architecture & Flow Diagrams @@ -590,7 +590,7 @@ For more complex scenarios, additional options can be specified: ### Extended Configuration Options -#### ForwardConfig +#### IForwardConfig - `type`: 'http-only' | 'https-passthrough' | 'https-terminate-to-http' | 'https-terminate-to-https' - `target`: { host: string | string[], port: number } - `http?`: { enabled?: boolean, redirectToHttps?: boolean, headers?: Record } @@ -601,7 +601,7 @@ For more complex scenarios, additional options can be specified: ## Configuration Options -### NetworkProxy (NetworkProxyOptions) +### NetworkProxy (INetworkProxyOptions) - `port` (number, required) - `backendProtocol` ('http1'|'http2', default 'http1') - `maxConnections` (number, default 10000) @@ -610,11 +610,11 @@ For more complex scenarios, additional options can be specified: - `cors` (object) - `connectionPoolSize` (number, default 50) - `logLevel` ('error'|'warn'|'info'|'debug') -- `acme` (AcmeOptions) +- `acme` (IAcmeOptions) - `useExternalPort80Handler` (boolean) - `portProxyIntegration` (boolean) -### Port80Handler (AcmeOptions) +### Port80Handler (IAcmeOptions) - `enabled` (boolean, default true) - `port` (number, default 80) - `contactEmail` (string) @@ -623,9 +623,9 @@ For more complex scenarios, additional options can be specified: - `autoRenew` (boolean, default true) - `certificateStore` (string) - `skipConfiguredCerts` (boolean) -- `domainForwards` (DomainForwardConfig[]) +- `domainForwards` (IDomainForwardConfig[]) -### NfTablesProxy (NfTableProxySettings) +### NfTablesProxy (INfTableProxySettings) - `fromPort` / `toPort` (number|range|array) - `toHost` (string, default 'localhost') - `preserveSourceIP`, `deleteOnExit`, `protocol`, `enableLogging`, `ipv6Support` (booleans) @@ -634,16 +634,16 @@ For more complex scenarios, additional options can be specified: - `qos`, `netProxyIntegration` (objects) ### Redirect / SslRedirect -- Constructor options: `httpPort`, `httpsPort`, `sslOptions`, `rules` (RedirectRule[]) +- Constructor options: `httpPort`, `httpsPort`, `sslOptions`, `rules` (IRedirectRule[]) -### SmartProxy (SmartProxyOptions) +### SmartProxy (ISmartProxyOptions) - `fromPort`, `toPort` (number) -- `domainConfigs` (DomainConfig[]) - Using unified forwarding configuration +- `domainConfigs` (IDomainConfig[]) - Using unified forwarding configuration - `sniEnabled`, `preserveSourceIP` (booleans) - `defaultAllowedIPs`, `defaultBlockedIPs` (string[]) - Default IP allowlists/blocklists - Timeouts: `initialDataTimeout`, `socketTimeout`, `inactivityTimeout`, etc. - Socket opts: `noDelay`, `keepAlive`, `enableKeepAliveProbes` -- `acme` (AcmeOptions), `certProvisionFunction` (callback) +- `acme` (IAcmeOptions), `certProvisionFunction` (callback) - `useNetworkProxy` (number[]), `networkProxyPort` (number) - `globalPortRanges` (Array<{ from: number; to: number }>) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 84bcb1d..f44d11c 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartproxy', - version: '13.1.1', + version: '13.1.2', 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.' }