Due to single thread nature of FTPClient, HybridFile.forEachChildrenFile cannot perform actions within for loop
Also fix back button on FTP server problem that causing crashes
- Remove redundant NOOP check that causing out-of-sequence calls to FTPClient; instead use FTPClient.isAvailable as status report
- Just close in/out channels, but no need to close the underlying BufferedInputStream/BufferedOutputStream, which caused copy to break on Android 9. With the ReadableByteChannel and WriteableByteChannel wrapping the streams, closing the channel at upper level should close the streams as well
- Also added a PrintCommandListener implementation that uses slf4j logger instead of just System.out
- Correct FTP TYPE I command
- Fix OutputStream wrapper at HybridFile.getOutputStream() for FTP
- Fix InputStream wrapper at HybridFile.getInputStream() for FTP
Disable any attempt to load file thumbnail on FTP files, due to thread unsafe feature of FTPClient
Also added workarounds to make sure placeholder icons are placed properly for FTP files, regardless of file thumbnail setting
- Change default port with change of protocol selection
- AbstractGetHostInfoTask throws all exceptions on connection failures
- Add support for anonymous FTP
- fix SftpConnectDialog, protocol dropdown doesn't follow system theme
- fix GetSshHostFingerprintTask throws error message on first connect to server fetching server cert info
- add condition on checking FTPClient connection validity
Fixes#1570.
- Refactored SshConnectionPool to more generic NetCopyClientConnectionPool
- Change SshClientTemplate to NetCopyClientTemplate
- Implement FTP client support. Defaults to passive FTP and implicit SSL for FTPS
- Add optional thread safety to NetCopyClientConnectionPool on executing NetCopyClientTemplate, as Apache FTPClient is not thread safe. This shall bring deadlocks when connecting to FTP servers, but let's see...
- Migrated GetSshHostFingerprintTask and SshAuthenticationTaskCallable to callable and RxJava, in align with FTP client implementation
- Downgrade Apache FTP server to 1.1.1, as problems found with enabling TLS at Amaze FTP server after previous upgrade to 1.1.4
Tested on Pixel 2 emulator running Android 11, against Amaze FTP server running on Oneplus 2 running Lineage OS 18.1 (11).