import ( "net/http" u "net/url" ) // http GET 代理 func HttpGetFromProxy(url,proxyURL string) (*http.Response,error) { req,_ := http.NewRequest("GET",url,nil) proxy,err := u.Parse(proxyURL) if err != nil { return nil,err } client := &http.Client{ Transport: &http.Transport{ Proxy : http.ProxyURL(proxy),},} return client.Do(req) }原文链接:https://www.f2er.com/go/191311.html