Skip to content

Commit

Permalink
fix: use defaultClient for proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
juev committed Dec 12, 2023
1 parent eb3d558 commit 6498b3d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions utils/utils.go
Expand Up @@ -3,11 +3,9 @@ package utils
import (
"fmt"
"io"
"net"
"net/http"
"os"
"path"
"time"

"github.com/gookit/color"
"github.com/schollz/progressbar/v3"
Expand All @@ -19,17 +17,8 @@ func DownloadWithProgress(url string, tarName string, destFolder string) (err er
if err != nil {
return err
}
client := &http.Client{
Transport: &http.Transport{
Dial: (&net.Dialer{
Timeout: 5 * time.Second,
}).Dial,
TLSHandshakeTimeout: 5 * time.Second,
},
Timeout: 10 * time.Second,
}

resp, err := client.Do(req)
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
Expand Down

0 comments on commit 6498b3d

Please sign in to comment.