code: @Nonnull
      private Proxy getProxy(String apiUrl) {
          Jenkins jenkins = GitHubWebHook.getJenkinsInstance();
  
          if (jenkins.proxy == null) {
              return Proxy.NO_PROXY;
          } else {
              try {
                  return jenkins.proxy.createProxy(new URL(apiUrl).getHost());
              } catch (MalformedURLException e) {
                  return jenkins.proxy.createProxy(apiUrl);
              }
          }
      }
docs: Uses proxy if configured on pluginManager/advanced page
  
  @param apiUrl GitHub's url to build proxy to
  
  @return proxy to use it in connector. Should not be null as it can lead to unexpected behaviour