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, setSoTimeout
public 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
- IOException
UnknownHostException
public String getHost()
SshTransport
getHost
in interface SshTransport
getHost
in class SocketWrapper
public SshTransport duplicate() throws IOException
SshTransport
duplicate
in interface SshTransport
duplicate
in class SocketWrapper
IOException
Copyright © 2024. All rights reserved.