org.apache.hc.client5.http.impl.sync

## Class ProxyClient

- java.lang.Object
- - org.apache.hc.client5.http.impl.sync.ProxyClient

    public class ProxyClient
    extends Object

ProxyClient can be used to establish a tunnel via an HTTP proxy.

### Constructor Summary

Constructors
Constructor and Description
`ProxyClient()`
`ProxyClient(org.apache.hc.core5.http.io.HttpConnectionFactory<ManagedHttpClientConnection> connFactory, org.apache.hc.core5.http.config.H1Config h1Config, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, RequestConfig requestConfig)`
`ProxyClient(RequestConfig requestConfig)`

### Method Summary

Methods
`Socket` `tunnel(org.apache.hc.core5.http.HttpHost proxy, org.apache.hc.core5.http.HttpHost target, Credentials credentials)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ProxyClient

    public ProxyClient(org.apache.hc.core5.http.io.HttpConnectionFactory<ManagedHttpClientConnection> connFactory,
               org.apache.hc.core5.http.config.H1Config h1Config,
               org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig,
               RequestConfig requestConfig)

Since:
  5.0

#### ProxyClient

    public ProxyClient(RequestConfig requestConfig)

Since:
  4.3

#### ProxyClient

    public ProxyClient()

### Method Detail

#### tunnel

    public Socket tunnel(org.apache.hc.core5.http.HttpHost proxy,
                org.apache.hc.core5.http.HttpHost target,
                Credentials credentials)
                  throws IOException,
                         org.apache.hc.core5.http.HttpException

Throws:
  `IOException`
  `org.apache.hc.core5.http.HttpException`