public class HttpProxyTransportWrapper extends SocketWrapper
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 ""socket| Modifier and Type | Method and Description |
|---|---|
static HttpProxyTransportWrapper |
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.
|
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() |
close, getInputStream, getOutputStream, getPort, getSocket, getSoTimeout, setSoTimeoutpublic static void setConnectionTimeout(int connectionTimeout)
public static int getConnectionTimeout()
public static HttpProxyTransportWrapper 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 String getHost()
SshTransportgetHost in interface SshTransportgetHost in class SocketWrapperpublic SshTransport duplicate() throws IOException
SshTransportduplicate in interface SshTransportduplicate in class SocketWrapperIOExceptionCopyright © 2025. All rights reserved.