fix(docs): Update readme to reflect updated interface and type naming conventions

This commit is contained in:
Philipp Kunz 2025-05-09 22:52:57 +00:00
parent c34462b781
commit e1a25b749c
3 changed files with 29 additions and 22 deletions

View File

@ -1,5 +1,12 @@
# Changelog # 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) ## 2025-05-09 - 13.1.1 - fix(typescript)
Refactor types and interfaces to use consistent 'I' prefix and update related tests Refactor types and interfaces to use consistent 'I' prefix and update related tests

View File

@ -73,12 +73,12 @@ The following classes and interfaces are provided:
- **ValidationUtils** (`ts/core/utils/validation-utils.ts`) for domain, port, and configuration validation - **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 - **IpUtils** (`ts/core/utils/ip-utils.ts`) for IP address validation and filtering
- **Interfaces** - **Interfaces and Types**
- `SmartProxyOptions`, `DomainConfig` (`ts/proxies/smart-proxy/models/interfaces.ts`) - `ISmartProxyOptions`, `IDomainConfig` (`ts/proxies/smart-proxy/models/interfaces.ts`)
- `NetworkProxyOptions` (`ts/proxies/network-proxy/models/types.ts`) - `INetworkProxyOptions` (`ts/proxies/network-proxy/models/types.ts`)
- `AcmeOptions`, `DomainOptions` (`ts/core/models/common-types.ts`) - `IAcmeOptions`, `IDomainOptions` (`ts/certificate/models/certificate-types.ts`)
- `NfTableProxySettings` (`ts/proxies/nftables-proxy/models/interfaces.ts`) - `INfTableProxySettings` (`ts/proxies/nftables-proxy/models/interfaces.ts`)
- `ForwardConfig`, `ForwardingType` (`ts/forwarding/config/forwarding-types.ts`) - `IForwardConfig`, `TForwardingType` (`ts/forwarding/config/forwarding-types.ts`)
## Installation ## Installation
Install via npm: Install via npm:
@ -256,11 +256,11 @@ const globPatterns = IpUtils.cidrToGlobPatterns('10.0.0.0/24');
## API Reference ## API Reference
For full configuration options and type definitions, see the TypeScript interfaces: For full configuration options and type definitions, see the TypeScript interfaces:
- `NetworkProxyOptions` (`ts/proxies/network-proxy/models/types.ts`) - `INetworkProxyOptions` (`ts/proxies/network-proxy/models/types.ts`)
- `AcmeOptions`, `DomainOptions` (`ts/core/models/common-types.ts`) - `IAcmeOptions`, `IDomainOptions` (`ts/certificate/models/certificate-types.ts`)
- `ForwardConfig` (`ts/forwarding/config/forwarding-types.ts`) - `IForwardConfig` (`ts/forwarding/config/forwarding-types.ts`)
- `NfTableProxySettings` (`ts/proxies/nftables-proxy/models/interfaces.ts`) - `INfTableProxySettings` (`ts/proxies/nftables-proxy/models/interfaces.ts`)
- `SmartProxyOptions`, `DomainConfig` (`ts/proxies/smart-proxy/models/interfaces.ts`) - `ISmartProxyOptions`, `IDomainConfig` (`ts/proxies/smart-proxy/models/interfaces.ts`)
## Architecture & Flow Diagrams ## Architecture & Flow Diagrams
@ -590,7 +590,7 @@ For more complex scenarios, additional options can be specified:
### Extended Configuration Options ### Extended Configuration Options
#### ForwardConfig #### IForwardConfig
- `type`: 'http-only' | 'https-passthrough' | 'https-terminate-to-http' | 'https-terminate-to-https' - `type`: 'http-only' | 'https-passthrough' | 'https-terminate-to-http' | 'https-terminate-to-https'
- `target`: { host: string | string[], port: number } - `target`: { host: string | string[], port: number }
- `http?`: { enabled?: boolean, redirectToHttps?: boolean, headers?: Record<string, string> } - `http?`: { enabled?: boolean, redirectToHttps?: boolean, headers?: Record<string, string> }
@ -601,7 +601,7 @@ For more complex scenarios, additional options can be specified:
## Configuration Options ## Configuration Options
### NetworkProxy (NetworkProxyOptions) ### NetworkProxy (INetworkProxyOptions)
- `port` (number, required) - `port` (number, required)
- `backendProtocol` ('http1'|'http2', default 'http1') - `backendProtocol` ('http1'|'http2', default 'http1')
- `maxConnections` (number, default 10000) - `maxConnections` (number, default 10000)
@ -610,11 +610,11 @@ For more complex scenarios, additional options can be specified:
- `cors` (object) - `cors` (object)
- `connectionPoolSize` (number, default 50) - `connectionPoolSize` (number, default 50)
- `logLevel` ('error'|'warn'|'info'|'debug') - `logLevel` ('error'|'warn'|'info'|'debug')
- `acme` (AcmeOptions) - `acme` (IAcmeOptions)
- `useExternalPort80Handler` (boolean) - `useExternalPort80Handler` (boolean)
- `portProxyIntegration` (boolean) - `portProxyIntegration` (boolean)
### Port80Handler (AcmeOptions) ### Port80Handler (IAcmeOptions)
- `enabled` (boolean, default true) - `enabled` (boolean, default true)
- `port` (number, default 80) - `port` (number, default 80)
- `contactEmail` (string) - `contactEmail` (string)
@ -623,9 +623,9 @@ For more complex scenarios, additional options can be specified:
- `autoRenew` (boolean, default true) - `autoRenew` (boolean, default true)
- `certificateStore` (string) - `certificateStore` (string)
- `skipConfiguredCerts` (boolean) - `skipConfiguredCerts` (boolean)
- `domainForwards` (DomainForwardConfig[]) - `domainForwards` (IDomainForwardConfig[])
### NfTablesProxy (NfTableProxySettings) ### NfTablesProxy (INfTableProxySettings)
- `fromPort` / `toPort` (number|range|array) - `fromPort` / `toPort` (number|range|array)
- `toHost` (string, default 'localhost') - `toHost` (string, default 'localhost')
- `preserveSourceIP`, `deleteOnExit`, `protocol`, `enableLogging`, `ipv6Support` (booleans) - `preserveSourceIP`, `deleteOnExit`, `protocol`, `enableLogging`, `ipv6Support` (booleans)
@ -634,16 +634,16 @@ For more complex scenarios, additional options can be specified:
- `qos`, `netProxyIntegration` (objects) - `qos`, `netProxyIntegration` (objects)
### Redirect / SslRedirect ### Redirect / SslRedirect
- Constructor options: `httpPort`, `httpsPort`, `sslOptions`, `rules` (RedirectRule[]) - Constructor options: `httpPort`, `httpsPort`, `sslOptions`, `rules` (IRedirectRule[])
### SmartProxy (SmartProxyOptions) ### SmartProxy (ISmartProxyOptions)
- `fromPort`, `toPort` (number) - `fromPort`, `toPort` (number)
- `domainConfigs` (DomainConfig[]) - Using unified forwarding configuration - `domainConfigs` (IDomainConfig[]) - Using unified forwarding configuration
- `sniEnabled`, `preserveSourceIP` (booleans) - `sniEnabled`, `preserveSourceIP` (booleans)
- `defaultAllowedIPs`, `defaultBlockedIPs` (string[]) - Default IP allowlists/blocklists - `defaultAllowedIPs`, `defaultBlockedIPs` (string[]) - Default IP allowlists/blocklists
- Timeouts: `initialDataTimeout`, `socketTimeout`, `inactivityTimeout`, etc. - Timeouts: `initialDataTimeout`, `socketTimeout`, `inactivityTimeout`, etc.
- Socket opts: `noDelay`, `keepAlive`, `enableKeepAliveProbes` - Socket opts: `noDelay`, `keepAlive`, `enableKeepAliveProbes`
- `acme` (AcmeOptions), `certProvisionFunction` (callback) - `acme` (IAcmeOptions), `certProvisionFunction` (callback)
- `useNetworkProxy` (number[]), `networkProxyPort` (number) - `useNetworkProxy` (number[]), `networkProxyPort` (number)
- `globalPortRanges` (Array<{ from: number; to: number }>) - `globalPortRanges` (Array<{ from: number; to: number }>)

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartproxy', 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.' 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.'
} }