New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FTP Added explicitSSL
parameter to FtpsSettings
(#976).
#977
Conversation
This still needs to be rebased, once #975 is merged. |
I wonder if we could find a good way to hook into the creation of the ftp client so that any special configuration could be added. |
@ennru Good point. I'll take a look at the JMS code, when I get a chance. |
@ennru Do you think adding a Also, if you have any naming suggestions, I'm all ears :). I feel like it needs to convey intent clearly, since |
Yes, a general hook to allow for custom configuration of the FTP client is what I'd like to see. By default, it would just be empty. |
@@ -74,6 +77,9 @@ final case class FtpSettings( | |||
|
|||
def withPassiveMode(passiveMode: Boolean): FtpSettings = | |||
copy(passiveMode = passiveMode) | |||
|
|||
def withConfigureConnection(configureConnection: FTPClient => Unit): FtpSettings = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ennru I'm assuming this is intended mostly for the Java api. Should I make this take a Function[FTPClient, Unit]
? Or do I need to use Void
? I never made Java api in Scala before :).
I want to add an example to the docs, but I'm struggling with how to use this in Java 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be java.util.function.Consumer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tnx. I was unable to convert that to Scala. Luckily, Java's lambda fit in elegantly.
It will call `execPROT("P")`, when connecting to the server.
@ennru lmk if I should make any more changes. I'm using this in my project already, and am happy with it :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
But it has a problem with the Java API on Scala 2.11. |
@anzecesar I added a Java-specific method taking a |
Thank you for your efforts, great to see this improving! |
@ennru Tnx. Happy to contribute :). |
Sounds interesting, do you have an example? In the FTPSClient the implicit flag is final (internally). |
I've tested it agains the server, which requires encrypted data transfer and it works.
I'm not super sure how to add this case to the specs yet.