We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
arduino
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 63eb9fe commit f31448cCopy full SHA for f31448c
cli/cli.go
@@ -259,5 +259,14 @@ func preRun(cmd *cobra.Command, args []string) {
259
netConf := downloader.Config{
260
RequestHeaders: globals.NewHTTPClientHeader(),
261
}
262
+ if viper.IsSet("network.proxy") {
263
+ proxy := viper.GetString("network.proxy")
264
+ if _, err := url.Parse(proxy); err != nil {
265
+ feedback.Error("Invalid network.proxy '" + proxy + "': " + err.Error())
266
+ os.Exit(errorcodes.ErrBadArgument)
267
+ }
268
+ netConf.ProxyURL = proxy
269
+ logrus.Infof("Using proxy %s", proxy)
270
271
downloader.SetDefaultConfig(netConf)
272
0 commit comments