ProxyURL您是否尝试过在收集器上设置它,而不是在回调函数中设置?// SetProxy sets a proxy for the collector. This method overrides the previously// used http.Transport if the type of the transport is not http.RoundTripper.// The proxy type is determined by the URL scheme. "http"// and "socks5" are supported. If the scheme is empty,// "http" is assumed.func (c *Collector) SetProxy(proxyURL string) error { proxyParsed, err := url.Parse(proxyURL) if err != nil { return err } c.SetProxyFunc(http.ProxyURL(proxyParsed)) return nil}