com.sshtools.net
Class HttpProxyTransportWrapper
java.lang.Object
com.sshtools.net.SocketWrapper
com.sshtools.net.HttpProxyTransportWrapper
- All Implemented Interfaces:
- SocketTimeoutSupport, SshIO, SshTransport
public class HttpProxyTransportWrapper
- extends SocketWrapper
Provides an 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 ""
- Author:
- Lee David Painter
connectViaProxy
public static HttpProxyTransportWrapper connectViaProxy(String host,
int port,
String proxyHost,
int proxyPort,
String username,
String password,
String userAgent)
throws IOException,
UnknownHostException
- Connect the socket to a HTTP proxy and request forwarding to our remote
host.
- Parameters:
host - port - proxyHost - proxyPort - username - password - userAgent -
- Returns:
- HttpProxyTransportWrapper
- Throws:
IOException
UnknownHostException
toString
public String toString()
- Overrides:
toString in class Object
getHost
public String getHost()
- Specified by:
getHost in interface SshTransport- Overrides:
getHost in class SocketWrapper
duplicate
public SshTransport duplicate()
throws IOException
- Specified by:
duplicate in interface SshTransport- Overrides:
duplicate in class SocketWrapper
- Throws:
IOException
Copyright © 2012. All Rights Reserved.