Class SftpStreamProxy

java.lang.Object
org.apache.commons.vfs2.provider.sftp.SftpStreamProxy
All Implemented Interfaces:
com.jcraft.jsch.Proxy

public class SftpStreamProxy extends Object implements 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 Details Link icon

  • Constructor Details Link icon

    • SftpStreamProxy Link icon

      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 user
      proxyHost - The proxy host
      proxyPort - The port to connect to on the proxy
      proxyPassword - The proxy password
      proxyOptions - Options used when connecting to the proxy
  • Method Details Link icon

    • close Link icon

      public void close()
      Specified by:
      close in interface com.jcraft.jsch.Proxy
    • connect Link icon

      public void connect(com.jcraft.jsch.SocketFactory socketFactory, String targetHost, int targetPort, int timeout) throws Exception
      Specified by:
      connect in interface com.jcraft.jsch.Proxy
      Throws:
      Exception
    • getInputStream Link icon

      Specified by:
      getInputStream in interface com.jcraft.jsch.Proxy
    • getOutputStream Link icon

      Specified by:
      getOutputStream in interface com.jcraft.jsch.Proxy
    • getSocket Link icon

      public Socket getSocket()
      Specified by:
      getSocket in interface com.jcraft.jsch.Proxy