Merge pull request #17 from adreed-msft/go-ieproxy
Transitioned go-pipeline to proxyMiddleman
This commit is contained in:
Коммит
bfd2029f73
4
go.mod
4
go.mod
|
@ -1 +1,5 @@
|
|||
module github.com/Azure/azure-pipeline-go
|
||||
|
||||
go 1.12
|
||||
|
||||
require github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149 // indirect
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149 h1:HfxbT6/JcvIljmERptWhwa8XzP7H3T+Z2N26gTsaDaA=
|
||||
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
|
@ -2,6 +2,7 @@ package pipeline
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/mattn/go-ieproxy"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
|
@ -204,7 +205,7 @@ func newDefaultHTTPClient() *http.Client {
|
|||
// We want the Transport to have a large connection pool
|
||||
return &http.Client{
|
||||
Transport: &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
Proxy: ieproxy.GetProxyFunc(),
|
||||
// We use Dial instead of DialContext as DialContext has been reported to cause slower performance.
|
||||
Dial /*Context*/ : (&net.Dialer{
|
||||
Timeout: 30 * time.Second,
|
||||
|
|
Загрузка…
Ссылка в новой задаче