@@ -41,8 +41,6 @@ func Run(productName, productTitle, productVersion string) {
41
41
}
42
42
}
43
43
}
44
- os .Setenv ("HTTP_PROXY" , "" )
45
- os .Setenv ("HTTPS_PROXY" , "" )
46
44
userConfigDir , err := os .UserConfigDir ()
47
45
48
46
userConfigDir = filepath .Join (userConfigDir , "Rocket Software" )
@@ -73,6 +71,15 @@ func Run(productName, productTitle, productVersion string) {
73
71
log .SetOutput (logFile )
74
72
log .Printf ("starting %s %s with arguments %v\n " , productTitle , productVersion , os .Args )
75
73
log .Printf ("current platform is OS=%q Architecture=%q\n " , runtime .GOOS , runtime .GOARCH )
74
+ log .Printf ("proxy settings are HTTP_PROXY=%s HTTPS_PROXY=%s NO_PROXY=%s UseHttpProxyEnvironmentVariable is %v\n " ,
75
+ os .Getenv ("HTTP_PROXY" ), os .Getenv ("HTTPS_PROXY" ), os .Getenv ("NO_PROXY" ),
76
+ settings .UseHttpProxyEnvironmentVariable (),
77
+ )
78
+ if ! settings .UseHttpProxyEnvironmentVariable () {
79
+ os .Setenv ("HTTP_PROXY" , "" )
80
+ os .Setenv ("HTTPS_PROXY" , "" )
81
+ os .Setenv ("NO_PROXY" , "" )
82
+ }
76
83
flag .BoolVar (& showConsole , "showconsole" , false , "show Java console" )
77
84
flag .BoolVar (& showConsole , "showConsole" , false , "show Java console" )
78
85
flag .StringVar (& javaDir , "javadir" , "" , "Java folder that should be used for starting a Java Web Start application" )
0 commit comments