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
## 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

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
- **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<string, string> }
@ -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 }>)

View File

@ -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.'
}