Package com.gargoylesoftware.htmlunit

Examples of com.gargoylesoftware.htmlunit.ProxyConfig


        // add HTTP proxy if set
        final Map<String, Object> httpParams = configuration.getHttpParams();
        if (httpParams != null && httpParams.get(ConnRoutePNames.DEFAULT_PROXY) != null) {
            final HttpHost proxyHost = (HttpHost) httpParams.get(ConnRoutePNames.DEFAULT_PROXY);
            final Boolean socksProxy = (Boolean) httpParams.get("http.route.socks-proxy");
            final ProxyConfig proxyConfig = new ProxyConfig(proxyHost.getHostName(), proxyHost.getPort(),
                socksProxy != null ? socksProxy : false);
            options.setProxyConfig(proxyConfig);
        }

        // authorize application on user's behalf
View Full Code Here


        // add HTTP proxy if set
        if (httpParams != null && httpParams.get(ConnRoutePNames.DEFAULT_PROXY) != null) {
            final HttpHost proxyHost = (HttpHost) httpParams.get(ConnRoutePNames.DEFAULT_PROXY);
            final Boolean socksProxy = (Boolean) httpParams.get("http.route.socks-proxy");
            final ProxyConfig proxyConfig = new ProxyConfig(proxyHost.getHostName(), proxyHost.getPort(),
                socksProxy != null ? socksProxy : false);
            options.setProxyConfig(proxyConfig);
        }

        if (!lazyAuth) {
View Full Code Here

        // add HTTP proxy if set
        if (httpParams != null && httpParams.get(ConnRoutePNames.DEFAULT_PROXY) != null) {
            final HttpHost proxyHost = (HttpHost) httpParams.get(ConnRoutePNames.DEFAULT_PROXY);
            final Boolean socksProxy = (Boolean) httpParams.get("http.route.socks-proxy");
            final ProxyConfig proxyConfig = new ProxyConfig(proxyHost.getHostName(), proxyHost.getPort(),
                socksProxy != null ? socksProxy : false);
            options.setProxyConfig(proxyConfig);
        }

        if (!lazyAuth) {
View Full Code Here

        // add HTTP proxy if set
        final Map<String, Object> httpParams = configuration.getHttpParams();
        if (httpParams != null && httpParams.get(ConnRoutePNames.DEFAULT_PROXY) != null) {
            final HttpHost proxyHost = (HttpHost) httpParams.get(ConnRoutePNames.DEFAULT_PROXY);
            final Boolean socksProxy = (Boolean) httpParams.get("http.route.socks-proxy");
            final ProxyConfig proxyConfig = new ProxyConfig(proxyHost.getHostName(), proxyHost.getPort(),
                socksProxy != null ? socksProxy : false);
            options.setProxyConfig(proxyConfig);
        }

        // authorize application on user's behalf
View Full Code Here

        IoUtils.getInstance().closeQuietly(serverSocket);
    }

    @Before
    public void setUp() {
        ProxyConfig proxyConfig = new ProxyConfig("localhost", proxyPort);
        proxyConfig.addHostsToProxyBypass("127.0.0.1");
        webClient.getOptions().setProxyConfig(proxyConfig);
        webClient.getOptions().setTimeout(1000);
    }
View Full Code Here

        IoUtils.getInstance().closeQuietly(serverSocket);
    }

    @Before
    public void setUp() {
        ProxyConfig proxyConfig = new ProxyConfig("localhost", proxyPort);
        proxyConfig.addHostsToProxyBypass("127.0.0.1");
        webClient.getOptions().setProxyConfig(proxyConfig);
        webClient.getOptions().setTimeout(1000);
    }
View Full Code Here

        IoUtils.getInstance().closeQuietly(serverSocket);
    }

    @Before
    public void setUp() {
        ProxyConfig proxyConfig = new ProxyConfig("localhost", proxyPort);
        proxyConfig.addHostsToProxyBypass("127.0.0.1");
        webClient.getOptions().setProxyConfig(proxyConfig);
        webClient.getOptions().setTimeout(2000);
    }
View Full Code Here

        IoUtils.getInstance().closeQuietly(serverSocket);
    }

    @Before
    public void setUp() throws IOException {
        ProxyConfig proxyConfig = new ProxyConfig("localhost", proxyPort);
        proxyConfig.addHostsToProxyBypass("127.0.0.1");
        webClient.getOptions().setProxyConfig(proxyConfig);
        webClient.getOptions().setTimeout(1000);
    }
View Full Code Here

        IoUtils.getInstance().closeQuietly(serverSocket);
    }

    @Before
    public void setUp() {
        ProxyConfig proxyConfig = new ProxyConfig("localhost", proxyPort);
        proxyConfig.addHostsToProxyBypass("127.0.0.1");
        webClient.getOptions().setProxyConfig(proxyConfig);
        webClient.getOptions().setTimeout(1000);
    }
View Full Code Here

    // Does nothing here to be overridden.
    return client;
  }

  public void setProxy(String host, int port) {
    proxyConfig = new ProxyConfig(host, port);
    webClient.setProxyConfig(proxyConfig);
  }
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.ProxyConfig

Copyright © 2018 www.massapicom. 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.