@eric8810/catcher-napi-http
Advanced tools
+7
-2
@@ -133,2 +133,3 @@ /* tslint:disable */ | ||
| * - Manual(默认,省略 `mode` 或 `mode: 'manual'`):必须提供 `url`。 | ||
| * - Direct(`mode: 'direct'`):强制直连,禁用显式代理、环境代理和自动系统代理。 | ||
| * - System(`mode: 'system'`):自动从 OS 读取系统代理(需构建时启用 `system-proxy` | ||
@@ -138,3 +139,3 @@ * feature),`url` 可省略。注意:System 模式仅在调用 `networkChanged()` 后才会 | ||
| */ | ||
| type ProxyConfig = ManualProxyConfig | SystemProxyConfig; | ||
| type ProxyConfig = ManualProxyConfig | DirectProxyConfig | SystemProxyConfig; | ||
| /** 手动代理(默认)。`url` 必填。 */ | ||
@@ -149,2 +150,6 @@ interface ManualProxyConfig { | ||
| } | ||
| /** 强制直连,不读取任何代理配置。 */ | ||
| interface DirectProxyConfig { | ||
| mode: 'direct'; | ||
| } | ||
| /** 系统代理:自动从 OS 检测(需构建时启用 `system-proxy` feature)。 */ | ||
@@ -257,2 +262,2 @@ interface SystemProxyConfig { | ||
| export type { BackoffStrategy, CircuitBreakerConfig, DnsConfig, HttpClientConfig, JsHttpResponse as HttpResponse, ManualProxyConfig, JsMetrics as Metrics, PoolConfig, ProxyAuth, ProxyConfig, RedirectConfig, RequestOptions, RetryConfig, SseClientConfig, SseEvent, StreamEvent, SystemProxyConfig, TlsConfig, TlsVersion }; | ||
| export type { BackoffStrategy, CircuitBreakerConfig, DirectProxyConfig, DnsConfig, HttpClientConfig, JsHttpResponse as HttpResponse, ManualProxyConfig, JsMetrics as Metrics, PoolConfig, ProxyAuth, ProxyConfig, RedirectConfig, RequestOptions, RetryConfig, SseClientConfig, SseEvent, StreamEvent, SystemProxyConfig, TlsConfig, TlsVersion }; |
+9
-9
| { | ||
| "name": "@eric8810/catcher-napi-http", | ||
| "version": "0.3.16", | ||
| "version": "0.3.17", | ||
| "description": "catcher HTTP native addon for Node.js via napi-rs", | ||
@@ -59,11 +59,11 @@ "main": "dist/client.js", | ||
| "optionalDependencies": { | ||
| "@eric8810/catcher-napi-http-win32-x64-msvc": "0.3.16", | ||
| "@eric8810/catcher-napi-http-darwin-x64": "0.3.16", | ||
| "@eric8810/catcher-napi-http-linux-x64-gnu": "0.3.16", | ||
| "@eric8810/catcher-napi-http-darwin-arm64": "0.3.16", | ||
| "@eric8810/catcher-napi-http-linux-x64-musl": "0.3.16", | ||
| "@eric8810/catcher-napi-http-linux-arm64-gnu": "0.3.16", | ||
| "@eric8810/catcher-napi-http-linux-arm64-musl": "0.3.16", | ||
| "@eric8810/catcher-napi-http-win32-arm64-msvc": "0.3.16" | ||
| "@eric8810/catcher-napi-http-win32-x64-msvc": "0.3.17", | ||
| "@eric8810/catcher-napi-http-darwin-x64": "0.3.17", | ||
| "@eric8810/catcher-napi-http-linux-x64-gnu": "0.3.17", | ||
| "@eric8810/catcher-napi-http-darwin-arm64": "0.3.17", | ||
| "@eric8810/catcher-napi-http-linux-x64-musl": "0.3.17", | ||
| "@eric8810/catcher-napi-http-linux-arm64-gnu": "0.3.17", | ||
| "@eric8810/catcher-napi-http-linux-arm64-musl": "0.3.17", | ||
| "@eric8810/catcher-napi-http-win32-arm64-msvc": "0.3.17" | ||
| } | ||
| } |
+10
-0
@@ -140,2 +140,7 @@ # @eric8810/catcher-napi-http | ||
| } | ||
| type ProxyConfig = | ||
| | { mode?: 'manual'; url: string; auth?: ProxyAuth; no_proxy?: string[] } | ||
| | { mode: 'direct' } | ||
| | { mode: 'system'; no_proxy?: string[] } | ||
| ``` | ||
@@ -145,2 +150,7 @@ | ||
| `mode: 'direct'` calls reqwest's `ClientBuilder::no_proxy()` and therefore ignores | ||
| explicit, environment, and automatic system proxies. `mode: 'system'` detects fixed | ||
| system proxies after `networkChanged()`; PAC/WPAD scripts must be resolved by the host | ||
| application and passed as a manual proxy because Catcher does not embed a PAC engine. | ||
| ### Methods | ||
@@ -147,0 +157,0 @@ |
38063
2.03%726
0.69%256
4.07%