Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/driver/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
cmd.Flags().BoolVar(&o.Compile, "compile", true, "Whether to enable local compilation of drivers")
cmd.Flags().BoolVar(&o.DownloadHeaders, "download-headers", true, "Whether to enable automatic kernel headers download where supported")
cmd.Flags().BoolVar(&o.InsecureDownload, "http-insecure", false, "Whether you want to allow insecure downloads or not")
cmd.Flags().BoolVar(&o.HttpProxy, "http-proxy", false, "Whether to use an HTTP proxy for driver downloads")

Check failure on line 83 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, arm64)

o.HttpProxy undefined (type driverInstallOptions has no field or method HttpProxy)

Check failure on line 83 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, amd64)

o.HttpProxy undefined (type driverInstallOptions has no field or method HttpProxy)
cmd.Flags().BoolVar(&o.HttpsProxy, "https-proxy", false, "Whether to use an HTTPS proxy for driver downloads")

Check failure on line 84 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, arm64)

o.HttpsProxy undefined (type driverInstallOptions has no field or method HttpsProxy)

Check failure on line 84 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, amd64)

o.HttpsProxy undefined (type driverInstallOptions has no field or method HttpsProxy)
cmd.Flags().DurationVar(&o.HTTPTimeout, "http-timeout", 60*time.Second, "Timeout for each http try")
cmd.Flags().StringVar(&o.HTTPHeaders, "http-headers",
"",
Expand All @@ -94,6 +96,13 @@
if downloadOptions.InsecureDownload {
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
}

// Download through a proxy
if downloadOptions.HttpProxy || downloadOptions.HttpsProxy {

Check failure on line 101 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, arm64)

downloadOptions.HttpsProxy undefined (type driverDownloadOptions has no field or method HttpsProxy)

Check failure on line 101 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, arm64)

downloadOptions.HttpProxy undefined (type driverDownloadOptions has no field or method HttpProxy)

Check failure on line 101 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, amd64)

downloadOptions.HttpsProxy undefined (type driverDownloadOptions has no field or method HttpsProxy)

Check failure on line 101 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, amd64)

downloadOptions.HttpProxy undefined (type driverDownloadOptions has no field or method HttpProxy)
// Use environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY)
tr.Proxy = http.ProxyFromEnvironment

Check failure on line 103 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, arm64)

undefined: tr

Check failure on line 103 in cmd/driver/install/install.go

View workflow job for this annotation

GitHub Actions / build (linux, amd64)

undefined: tr
}

http.DefaultClient.Timeout = downloadOptions.HTTPTimeout
}

Expand Down
Loading