public class HttpProxyTransport extends Socket implements SshTransport
SshTransport implementation that can route the connection
 through a HTTP proxy.
 To connect the transport simply call the connectViaProxy(String, int, String, int, String, String, String)
 method. You can pass the name of your application as the user agent and if no authentication
 is required simply pass ""| Modifier and Type | Method and Description | 
|---|---|
| static HttpProxyTransport | connectViaProxy(String host,
               int port,
               String proxyHost,
               int proxyPort,
               String username,
               String password,
               String userAgent)Connect the socket to a HTTP proxy and request forwarding to our
 remote host. | 
| static HttpProxyTransport | connectViaProxy(String host,
               int port,
               String proxyHost,
               int proxyPort,
               String username,
               String password,
               String userAgent,
               Hashtable<String,String> optionalHeaders) | 
| SshTransport | duplicate()Create a new copy of this transport and connect to the
 same host:port combination. | 
| static int | getConnectionTimeout() | 
| String | getHost()Get the name of the connected host. | 
| static void | setConnectionTimeout(int connectionTimeout) | 
| String | toString() | 
bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutputclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPortclose, getInputStream, getOutputStreampublic static void setConnectionTimeout(int connectionTimeout)
public static int getConnectionTimeout()
public static HttpProxyTransport connectViaProxy(String host, int port, String proxyHost, int proxyPort, String username, String password, String userAgent) throws IOException, UnknownHostException
host - port - proxyHost - proxyPort - username - password - userAgent - IOExceptionUnknownHostExceptionpublic static HttpProxyTransport connectViaProxy(String host, int port, String proxyHost, int proxyPort, String username, String password, String userAgent, Hashtable<String,String> optionalHeaders) throws IOException, UnknownHostException
host - port - proxyHost - proxyPort - username - password - userAgent - optionalHeaders - IOExceptionUnknownHostExceptionpublic String getHost()
SshTransportgetHost in interface SshTransportpublic SshTransport duplicate() throws IOException
SshTransportduplicate in interface SshTransportIOExceptionCopyright © 2025. All rights reserved.