andrewkroh / gvm

Go Version Manager (written in Go for cross-platform usability)
Apache License 2.0
195 stars 24 forks source link

Make download timeout configurable #43

Closed breml closed 2 years ago

breml commented 2 years ago

I am behind a corporate proxy, which performs some security scanning on all downloads, especially archives. For archives, it will first download the whole thing, scan it and only then pass it to the client. This is done be just sending the client the first few KB and keeping the connection open until the scanning has been completed. Unfortunately, this can take quite some time, especially for big archives with lots of files (like the Go releases) and therefore, the download hits the 3 minute timeout defined in https://github.com/andrewkroh/gvm/blob/main/common/common.go#L39.

In order for me to be able to use GVM, I would need an option to configure this timeout.

breml commented 2 years ago

I get the following error message:

$ time bin/gvm 1.17.4
gvm: error: failed downloading from https://storage.googleapis.com/golang/go1.17.4.linux-amd64.tar.gz: failed to write file to disk: context deadline exceeded (Client.Timeout or context cancellation while reading body)

real    9m0.413s
user    0m0.281s
sys     0m0.625s
andrewkroh commented 2 years ago

Added in https://github.com/andrewkroh/gvm/pull/45.

andrewkroh commented 2 years ago

Released in https://github.com/andrewkroh/gvm/releases/tag/v0.4.0.