Examples of addNonProxyHost()


Examples of com.ning.http.client.ProxyServer.addNonProxyHost()

            ProxyServer proxyServer = new ProxyServer(protocol, host, port, System.getProperty(PROXY_USER), System.getProperty(PROXY_PASSWORD));
           
            String nonProxyHosts = System.getProperties().getProperty(PROXY_NONPROXYHOSTS);
            if (nonProxyHosts != null) {
                for (String spec : nonProxyHosts.split("\\|")) {
                    proxyServer.addNonProxyHost(spec);
                }
            }
           
            return proxyServer;
        }
View Full Code Here

Examples of com.ning.http.client.ProxyServer.addNonProxyHost()

            }
            ProxyServer proxy = new ProxyServer(proxyHost, proxyPortInt, proxyUser, proxyPassword);
            if (nonProxyHosts != null) {
                final String[] strings = nonProxyHosts.split("\\|");
                for (String uril : strings) {
                    proxy.addNonProxyHost(uril);
                }
            }
            confBuilder.setProxyServer(proxy);
        }
        if (userAgent != null) {
View Full Code Here

Examples of org.asynchttpclient.ProxyServer.addNonProxyHost()

                    properties.getProperty(PROXY_PASSWORD));

            String nonProxyHosts = properties.getProperty(PROXY_NONPROXYHOSTS);
            if (nonProxyHosts != null) {
                for (String spec : nonProxyHosts.split("\\|")) {
                    proxyServer.addNonProxyHost(spec);
                }
            }

            return createProxyServerSelector(proxyServer);
        }
View Full Code Here

Examples of org.asynchttpclient.ProxyServer.addNonProxyHost()

        assertTrue(ProxyUtils.avoidProxy(null, req));

        // should avoid, it's in non-proxy hosts
        req = new RequestBuilder("GET").setUrl("http://somewhere.com/foo").build();
        ProxyServer proxyServer = new ProxyServer("foo", 1234);
        proxyServer.addNonProxyHost("somewhere.com");
        assertTrue(ProxyUtils.avoidProxy(proxyServer, req));

        // should avoid, it's in non-proxy hosts (with "*")
        req = new RequestBuilder("GET").setUrl("http://sub.somewhere.com/foo").build();
        proxyServer = new ProxyServer("foo", 1234);
View Full Code Here

Examples of org.asynchttpclient.ProxyServer.addNonProxyHost()

        assertTrue(ProxyUtils.avoidProxy(proxyServer, req));

        // should avoid, it's in non-proxy hosts (with "*")
        req = new RequestBuilder("GET").setUrl("http://sub.somewhere.com/foo").build();
        proxyServer = new ProxyServer("foo", 1234);
        proxyServer.addNonProxyHost("*.somewhere.com");
        assertTrue(ProxyUtils.avoidProxy(proxyServer, req));

        // should use it
        req = new RequestBuilder("GET").setUrl("http://sub.somewhere.com/foo").build();
        proxyServer = new ProxyServer("foo", 1234);
View Full Code Here

Examples of org.asynchttpclient.ProxyServer.addNonProxyHost()

        assertTrue(ProxyUtils.avoidProxy(proxyServer, req));

        // should use it
        req = new RequestBuilder("GET").setUrl("http://sub.somewhere.com/foo").build();
        proxyServer = new ProxyServer("foo", 1234);
        proxyServer.addNonProxyHost("*.somewhere.org");
        assertFalse(ProxyUtils.avoidProxy(proxyServer, req));
    }
}
View Full Code Here

Examples of org.sonatype.nexus.rest.model.RemoteProxySettingsDTO.addNonProxyHost()

    proxy.setHttpProxySettings(new RemoteHttpProxySettingsDTO());
    proxy.getHttpProxySettings().setProxyHostname("http://somejunkproxyurl");
    proxy.getHttpProxySettings().setProxyPort(555);

    proxy.getNonProxyHosts().clear();
    proxy.addNonProxyHost("localhost");

    final Status status = SettingsMessageUtil.save(resource);

    assertThat(status.isSuccess(), is(true));
  }
View Full Code Here

Examples of org.sonatype.nexus.rest.model.RemoteProxySettingsDTO.addNonProxyHost()

    settings.getHttpProxySettings().setProxyHostname("bar");

    settings.setHttpsProxySettings(new RemoteHttpProxySettingsDTO());
    settings.getHttpsProxySettings().setProxyHostname("car");

    settings.addNonProxyHost("foo");

    underTest.save();

    assertThat(configuration.getRemoteProxySettings(), is(notNullValue()));
View Full Code Here

Examples of org.sonatype.nexus.rest.model.RemoteProxySettingsDTO.addNonProxyHost()

    final RemoteProxySettingsDTO configSettings = new RemoteProxySettingsDTO();
    configSettings.setHttpProxySettings(new RemoteHttpProxySettingsDTO());
    configSettings.getHttpProxySettings().setProxyHostname("foo");
    configSettings.setHttpsProxySettings(new RemoteHttpProxySettingsDTO());
    configSettings.getHttpsProxySettings().setProxyHostname("bar");
    configSettings.addNonProxyHost("car1");
    configuration.setRemoteProxySettings(configSettings);

    final RemoteProxy underTest = createJerseyHttpProxy();
    final RemoteProxySettingsDTO settings = underTest.settings();
View Full Code Here

Examples of org.sonatype.nexus.rest.model.RemoteProxySettingsDTO.addNonProxyHost()

    final RemoteProxy underTest = createJerseyHttpProxy();
    final RemoteProxySettingsDTO settings = underTest.settings();

    assertThat(settings, is(notNullValue()));

    settings.addNonProxyHost("bar");
    underTest.refresh();

    assertThat(settings.getNonProxyHosts(), not(hasItem("bar")));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.