code: public static URLConnection open(URL url) throws IOException {
          final ProxyConfiguration p = get();
          
          URLConnection con;
          if(p==null) {
              con = url.openConnection();
          } else {
              Proxy proxy = p.createProxy(url.getHost());
              con = url.openConnection(proxy);
              if(p.getUserName()!=null) {
                  // Add an authenticator which provides the credentials for proxy authentication
                  Authenticator.setDefault(p.authenticator);
                  p.jenkins48775workaround(proxy, url);
              }
          }
          
          if(DEFAULT_CONNECT_TIMEOUT_MILLIS > 0) {
              con.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT_MILLIS);
          }
          
          if (JenkinsJVM.isJenkinsJVM()) { // this code may run on a slave
              decorate(con);
          }
  
          return con;
      }
docs: This method should be used wherever {@link URL#openConnection()} to internet URLs is invoked directly.