private static Proxy createStreamProxy(final String proxyHost, final int proxyPort, final FileSystemOptions fileSystemOptions, final SftpFileSystemConfigBuilder builder) { Proxy proxy; // Use a stream proxy, i.e. it will use a remote host as a proxy // and run a command (e.g. netcat) that forwards input/output // to the target host. // Here we get the settings for connecting to the proxy: // user, password, options and a command final String proxyUser = builder.getProxyUser(fileSystemOptions); final String proxyPassword = builder.getProxyPassword(fileSystemOptions); final FileSystemOptions proxyOptions = builder.getProxyOptions(fileSystemOptions); final String proxyCommand = builder.getProxyCommand(fileSystemOptions); // Create the stream proxy proxy = new SftpStreamProxy(proxyCommand, proxyUser, proxyHost, proxyPort, proxyPassword, proxyOptions); return proxy; }
private static Proxy createStreamProxy(final String proxyHost, final int proxyPort, final FileSystemOptions fileSystemOptions, final SftpFileSystemConfigBuilder builder) { Proxy proxy; // Use a stream proxy, i.e. it will use a remote host as a proxy // and run a command (e.g. netcat) that forwards input/output // to the target host. // Here we get the settings for connecting to the proxy: // user, password, options and a command final String proxyUser = builder.getProxyUser(fileSystemOptions); final String proxyPassword = builder.getProxyPassword(fileSystemOptions); final FileSystemOptions proxyOptions = builder.getProxyOptions(fileSystemOptions); final String proxyCommand = builder.getProxyCommand(fileSystemOptions); // Create the stream proxy proxy = new SftpStreamProxy(proxyCommand, proxyUser, proxyHost, proxyPort, proxyPassword, proxyOptions); return proxy; }
private static Proxy createStreamProxy(final String proxyHost, final int proxyPort, final FileSystemOptions fileSystemOptions, final SftpFileSystemConfigBuilder builder) { Proxy proxy; // Use a stream proxy, i.e. it will use a remote host as a proxy // and run a command (e.g. netcat) that forwards input/output // to the target host. // Here we get the settings for connecting to the proxy: // user, password, options and a command final String proxyUser = builder.getProxyUser(fileSystemOptions); final String proxyPassword = builder.getProxyPassword(fileSystemOptions); final FileSystemOptions proxyOptions = builder.getProxyOptions(fileSystemOptions); final String proxyCommand = builder.getProxyCommand(fileSystemOptions); // Create the stream proxy proxy = new SftpStreamProxy(proxyCommand, proxyUser, proxyHost, proxyPort, proxyPassword, proxyOptions); return proxy; }
public static Proxy createStreamProxy(final String proxyHost, final int proxyPort, final FileSystemOptions fileSystemOptions, final SftpFileSystemConfigBuilder builder) { Proxy proxy; // Use a stream proxy, i.e. it will use a remote host as a proxy // and run a command (e.g. netcat) that forwards input/output // to the target host. // Here we get the settings for connecting to the proxy: // user, password, options and a command final String proxyUser = builder.getProxyUser(fileSystemOptions); final String proxyPassword = builder.getProxyPassword(fileSystemOptions); final FileSystemOptions proxyOptions = builder.getProxyOptions(fileSystemOptions); final String proxyCommand = builder.getProxyCommand(fileSystemOptions); // Create the stream proxy proxy = new SftpStreamProxy(proxyCommand, proxyUser, proxyHost, proxyPort, proxyPassword, proxyOptions); return proxy; }