Search in sources :

Example 26 with ProxyOptions

use of io.vertx.core.net.ProxyOptions in project vert.x by eclipse.

the class Http1xProxyTest method testWsNonProxyHosts.

@Test
public void testWsNonProxyHosts() throws Exception {
    startProxy(null, ProxyType.HTTP);
    testWebSocket(createBaseServerOptions(), new HttpClientOptions().addNonProxyHost("localhost").setProxyOptions(new ProxyOptions().setType(ProxyType.HTTP).setHost(DEFAULT_HTTP_HOST).setPort(proxy.getPort())), false);
}
Also used : ProxyOptions(io.vertx.core.net.ProxyOptions) Test(org.junit.Test)

Example 27 with ProxyOptions

use of io.vertx.core.net.ProxyOptions in project vert.x by eclipse.

the class Http1xProxyTest method testWsSocks5Proxy.

@Test
public void testWsSocks5Proxy() throws Exception {
    startProxy(null, ProxyType.SOCKS5);
    testWebSocket(createBaseServerOptions(), new HttpClientOptions().setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS5).setHost(DEFAULT_HTTP_HOST).setPort(proxy.getPort())), true);
}
Also used : ProxyOptions(io.vertx.core.net.ProxyOptions) Test(org.junit.Test)

Example 28 with ProxyOptions

use of io.vertx.core.net.ProxyOptions in project vert.x by eclipse.

the class Http1xProxyTest method testWssSocks5Proxy.

@Test
public void testWssSocks5Proxy() throws Exception {
    startProxy(null, ProxyType.SOCKS5);
    testWebSocket(createBaseServerOptions().setSsl(true).setKeyCertOptions(Cert.SERVER_JKS.get()), new HttpClientOptions().setSsl(true).setTrustOptions(Cert.SERVER_JKS.get()).setProxyOptions(new ProxyOptions().setType(ProxyType.SOCKS5).setHost(DEFAULT_HTTP_HOST).setPort(proxy.getPort())), true);
}
Also used : ProxyOptions(io.vertx.core.net.ProxyOptions) Test(org.junit.Test)

Aggregations

ProxyOptions (io.vertx.core.net.ProxyOptions)28 Test (org.junit.Test)15 HttpClientOptions (io.vertx.core.http.HttpClientOptions)7 SocketAddress (io.vertx.core.net.SocketAddress)5 JsonObject (io.vertx.core.json.JsonObject)4 Handler (io.vertx.core.Handler)3 HttpClientRequest (io.vertx.core.http.HttpClientRequest)3 ProxyType (io.vertx.core.net.ProxyType)3 HttpClientSslOptions (io.gravitee.definition.model.HttpClientSslOptions)2 HttpProxy (io.gravitee.definition.model.HttpProxy)2 HttpClient (io.vertx.core.http.HttpClient)2 ContextInternal (io.vertx.core.impl.ContextInternal)2 Endpoint (io.vertx.core.net.impl.pool.Endpoint)2 SSLCustom (org.apache.servicecomb.foundation.ssl.SSLCustom)2 SSLOption (org.apache.servicecomb.foundation.ssl.SSLOption)2 SSLOptionFactory (org.apache.servicecomb.foundation.ssl.SSLOptionFactory)2 HttpHeaders (io.gravitee.common.http.HttpHeaders)1 HttpStatusCode (io.gravitee.common.http.HttpStatusCode)1 HttpEndpoint (io.gravitee.definition.model.endpoint.HttpEndpoint)1 EndpointRule (io.gravitee.gateway.services.healthcheck.EndpointRule)1