Class SftpStreamProxy
java.lang.Object
org.apache.commons.vfs2.provider.sftp.SftpStreamProxy
- All Implemented Interfaces:
com.jcraft.jsch.Proxy
Stream based proxy for JSch.
Use a command on the proxy that will forward the SSH stream to the target host and port.
- Since:
- 2.1
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSftpStreamProxy
(String commandFormat, String proxyUser, String proxyHost, int proxyPort, String proxyPassword, FileSystemOptions proxyOptions) Creates a stream proxy. -
Method Summary
-
Field Details
-
BASH_TCP_COMMAND
Command format using bash built-in TCP stream.- See Also:
-
NETCAT_COMMAND
-
-
Constructor Details
-
SftpStreamProxy
public SftpStreamProxy(String commandFormat, String proxyUser, String proxyHost, int proxyPort, String proxyPassword, FileSystemOptions proxyOptions) Creates a stream proxy.- Parameters:
commandFormat
- A format string that will be used to create the command to execute on the proxy host using String.format(String, Object...). Two parameters are given to the format command, the target host name (String) and port (Integer).proxyUser
- The proxy userproxyHost
- The proxy hostproxyPort
- The port to connect to on the proxyproxyPassword
- The proxy passwordproxyOptions
- Options used when connecting to the proxy
-
-
Method Details
-
close
- Specified by:
close
in interfacecom.jcraft.jsch.Proxy
-
connect
-
getInputStream
- Specified by:
getInputStream
in interfacecom.jcraft.jsch.Proxy
-
getOutputStream
- Specified by:
getOutputStream
in interfacecom.jcraft.jsch.Proxy
-
getSocket
-