NiFi FetchSFTP: Configure a SOCKS5 Proxy Service
Attach a StandardProxyConfigurationService to FetchSFTP and keep the SSH destination and intermediary in their own fields.
FetchSFTP versions exposing the Proxy Configuration Service property can use a shared proxy controller service. In the NiFi 2.12 component interface, the setup is:
- Create a StandardProxyConfigurationService in the appropriate process-group scope.
- For a SOCKS5 route, set Proxy Type to SOCKS and SOCKS Version to 5.
- Enter the proxy’s Server Host and Server Port, and its username and password when required. For a public SFTP destination, the SOCKS5 proxy list supplies candidates; the selected proxy must still permit that destination and port.
- Enable the service and select it in FetchSFTP’s Proxy Configuration Service property before starting the processor.
The controller service defaults to DIRECT. Filling in an address while leaving that route type unchanged does not select a SOCKS connection.
| Input | Where it belongs |
|---|---|
| SFTP server hostname and port | The SFTP processor |
| SSH user, authentication and host-key verification | The processor’s SSH configuration |
| Proxy host, port, protocol and account | The selected proxy controller service |
Keep the SFTP target as the real SSH server. The proxy receives the request to open that target connection; it does not become the SFTP login endpoint.
Retain Strict Host Key Checking and the intended Host Key File for the server. A reachable proxy is only the first network hop in the transfer.
Other NiFi components can use proxy controller services too, but their supported proxy types are component-specific. Check the actual SFTP processor’s properties when working with another NiFi release.