From ef95bc45d01bb8807cd490445717a70351c3c9a1 Mon Sep 17 00:00:00 2001 From: JianFeeeee Date: Tue, 27 Oct 2026 00:00:19 +0800 Subject: [PATCH] =?UTF-8?q?docs(provider):=20=E4=B8=AD=E6=80=A7=E5=8C=96?= =?UTF-8?q?=E4=BC=A0=E8=BE=93=E4=BB=A3=E7=90=86=E6=B3=A8=E9=87=8A=E9=87=8C?= =?UTF-8?q?=E7=9A=84=E7=AC=AC=E4=B8=89=E6=96=B9=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E8=A1=A8=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `internal/provider/provider.go` 的两处注释用第三方客户端名作代理示例 (`clash on 127.0.0.1:7890`)。改成中性的「a local HTTP proxy on 127.0.0.1:7890」,语义不变:仍然是在说明 per-source `proxy_url` 的用途。 上一轮中性化只做了大小写敏感的 `Clash` 扫描,漏掉了这两处小写; 本次改用 `-i` 全仓复查,源码/文档/打包内已无该表述(`clashing`、 `diverge` 这类同形词不属此列)。 --- internal/provider/provider.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/provider/provider.go b/internal/provider/provider.go index faef2d8..03f4e5e 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -26,9 +26,9 @@ import ( ) // proxyFor picks the transport proxy for one source. An explicit per-source -// proxy_url wins (e.g. clash on 127.0.0.1:7890 for a geo-blocked upstream); -// otherwise fall back to the process-wide env proxy, which is direct by -// default. +// proxy_url wins (e.g. a local HTTP proxy on 127.0.0.1:7890 for an upstream +// that is only reachable through it); otherwise fall back to the +// process-wide env proxy, which is direct by default. func proxyFor(cfg config.Source) func(*http.Request) (*url.URL, error) { if cfg.ProxyURL != "" { proxyURL, err := url.Parse(cfg.ProxyURL) @@ -403,9 +403,10 @@ func New(cfg config.Source, vm *lua.VM) *Provider { // Shared transport: ResponseHeaderTimeout bounds how long we wait for the // first response byte (applies to both paths); the stream client has no // client-level Timeout so the SSE body can run past the header timeout. - // A per-source ProxyURL (e.g. clash on 127.0.0.1:7890) overrides the - // process-wide env proxy for upstreams that are geo/IP-blocked; sources - // without one keep http.ProxyFromEnvironment (direct by default). + // A per-source ProxyURL (e.g. a local HTTP proxy on 127.0.0.1:7890) + // overrides the process-wide env proxy for upstreams that need an explicit + // egress path; sources without one keep http.ProxyFromEnvironment (direct + // by default). tr := &http.Transport{ Proxy: proxyFor(cfg), DialContext: (&net.Dialer{Timeout: 30 * time.Second, KeepAlive: 30 * time.Second}).DialContext,