Skip to content

Commit dfe45c7

Browse files
GH-8559: Document how to enable SOCKS for SFTP (#8565)
* GH-8559: Document how to enable SOCKS for SFTP Fixes #8559 An out-of-the-box `SshClient` does not provide a smooth HTTP/SOCKS proxy configuration. * Mention in the `sftp.adoc` that `JGitSshClient`, configured with SOCKS, can be injected into a `DefaultSftpSessionFactory` * Fix Javadocs for `DefaultSftpSessionFactory`, respectively * Fix language in doc Co-authored-by: Gary Russell <[email protected]> --------- Co-authored-by: Gary Russell <[email protected]>
1 parent 38f1934 commit dfe45c7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

spring-integration-sftp/src/main/java/org/springframework/integration/sftp/session/DefaultSftpSessionFactory.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ public DefaultSftpSessionFactory(boolean isSharedSession) {
115115
}
116116

117117
/**
118-
* Intended for use in tests so the MINA SSHD can be mocked.
119-
* @param sshClient The SshClient instance.
118+
* Instantiate based on the provided {@link SshClient}, e.g. some extension for HTTP/SOCKS.
119+
* @param sshClient the {@link SshClient} instance.
120120
* @param isSharedSession true if the session is to be shared.
121121
*/
122122
public DefaultSftpSessionFactory(SshClient sshClient, boolean isSharedSession) {

src/reference/asciidoc/sftp.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ Under the covers, the SFTP Session Factory relies on the https://mina.apache.org
7575
However, Spring Integration also supports the caching of SFTP sessions.
7676
See <<sftp-session-caching>> for more information.
7777

78+
NOTE: The `DefaultSftpSessionFactory` can use an externally configured or extended `SshClient`.
79+
For example, the `org.eclipse.jgit.internal.transport.sshd.JGitSshClient` extension from the `org.eclipse.jgit:org.eclipse.jgit.ssh.apache` library may be used to provide support for HTTP/SOCKS proxies.
80+
7881
[IMPORTANT]
7982
=====
8083
The `SshClient` supports multiple channels (operations) over a connection to the server.

0 commit comments

Comments
 (0)