private static URL getProxyUrl(Config config) throws MalformedURLException { URL master = new URL(config.getMasterUrl()); String host = master.getHost(); if (config.getNoProxy() != null) { for (String noProxy : config.getNoProxy()) { if (isIpAddress(noProxy)) { if (new IpAddressMatcher(noProxy).matches(host)) { return null; } } else { if (host.contains(noProxy)) { return null; } } } } String proxy = config.getHttpsProxy(); if (master.getProtocol().equals("http")) { proxy = config.getHttpProxy(); } if (proxy != null) { return new URL(proxy); } return null; }
base.isTrustCerts())) .withHttpProxy(or(kubernetesClientProperties.getHttpProxy(), base.getHttpProxy())) .withHttpsProxy(or(kubernetesClientProperties.getHttpsProxy(), base.getHttpsProxy()))
config.setHttpProxy(Utils.getSystemPropertyOrEnvVar(KUBERNETES_ALL_PROXY, config.getHttpProxy())); config.setHttpsProxy(Utils.getSystemPropertyOrEnvVar(KUBERNETES_ALL_PROXY, config.getHttpsProxy())); config.setHttpProxy(Utils.getSystemPropertyOrEnvVar(KUBERNETES_HTTP_PROXY, config.getHttpProxy()));
private static URL getProxyUrl(Config config) throws MalformedURLException { URL master = new URL(config.getMasterUrl()); String host = master.getHost(); if (config.getNoProxy() != null) { for (String noProxy : config.getNoProxy()) { if (host.endsWith(noProxy)) { return null; } } } String proxy = config.getHttpsProxy(); if (master.getProtocol().equals("http")) { proxy = config.getHttpProxy(); } if (proxy != null) { return new URL(proxy); } return null; } }
kubernetesConfig.getLoggingInterval(), kubernetesConfig.getMaxConcurrentRequestsPerHost(), kubernetesConfig.getHttpProxy(), kubernetesConfig.getHttpsProxy(), kubernetesConfig.getNoProxy(),
assertEquals("passphrase", config.getClientKeyPassphrase()); assertEquals("httpProxy", config.getHttpProxy());
config.setHttpProxy(Utils.getSystemPropertyOrEnvVar(KUBERNETES_ALL_PROXY, config.getHttpProxy())); config.setHttpsProxy(Utils.getSystemPropertyOrEnvVar(KUBERNETES_ALL_PROXY, config.getHttpsProxy())); config.setHttpProxy(Utils.getSystemPropertyOrEnvVar(KUBERNETES_HTTP_PROXY, config.getHttpProxy()));
base.isTrustCerts())) .withHttpProxy(or(kubernetesClientProperties.getHttpProxy(), base.getHttpProxy())) .withHttpsProxy(or(kubernetesClientProperties.getHttpsProxy(), base.getHttpsProxy()))
kubernetesConfig.getLoggingInterval(), kubernetesConfig.getMaxConcurrentRequestsPerHost(), kubernetesConfig.getHttpProxy(), kubernetesConfig.getHttpsProxy(), kubernetesConfig.getNoProxy(),