Skip to content
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

Added minimal support for FTP with TLS/SSL #110

Closed
wants to merge 5 commits into from
Closed

Added minimal support for FTP with TLS/SSL #110

wants to merge 5 commits into from

Conversation

jayagl
Copy link

@jayagl jayagl commented Dec 5, 2014

Tested only over FTP with implicit TLS/SSL encryption.
Operations tested - ls(), get().

Tested only over FTP with implicit TLS/SSL encryption. Operations tested
- ls(), get().
@jayagl
Copy link
Author

jayagl commented Dec 5, 2014

Sorry this is very minimal, but it doesn't break any of the previous functionality and provides FTP with TLS in a very simple form.

  • The init config needs a param called 'ssl' set to true. It will then create the socket using TLS. Also takes a secondary 'sslOptions' object in the config to pass to tls.connect().
  • I was having trouble getting files over a secure connection and getting a 522 FTP error. But I managed to get around that by explicitly running the 'prot p' command on connect to specify that the data channel is protected. Not sure if this is applicable to all cases but it worked for mine.
    I am on a deadline here, so didn't have time to update tests or docs.

@sergi
Copy link
Owner

sergi commented Dec 8, 2014

Hi @jayagl. Can you include tests in your PR? Thanks!

Updated the jsftp_test.js to run all the tests with SSL config after
running them normally. Made some changes to deal with windows file
systems.
@jayagl
Copy link
Author

jayagl commented Dec 17, 2014

Hi @sergi, I figured it would be best to run all the pre-existing tests with SSL enabled. I've added some code to do that. I also made some other minor changes to the test file to be more cross-platform friendly. I had lots of trouble running tests in my local environment: with windows filesystem things; creating an FTP server (resorted to running a server externally); with before/after hooks, etc.


this.pipeline = es.pipeline(socket, this.resParser);
if(this.ssl){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space between if and (

@dcolens
Copy link

dcolens commented Jun 3, 2015

do you plan to merge this request ?

@Philipp91
Copy link

For me, this code is working. The normal (non-secure) test suite runs up to "test invalid password" and after that it fails for reasons I haven't yet investigated. When I then apply this pull request and use the same server (that also supports explicit FTPS, but not implicit FTPS by the way) then the test suite runs in the same way and crashes at the same place.

It would be great to see this integrated, as that would make FTPS available in the Brackets code editor through the eqFTP plugin. If that helps, I can provide a temporary FTPS test account on my server for testing.

@dustinbolton
Copy link

Any hope of this making it in? It would be lovely to have.

@jayagl
Copy link
Author

jayagl commented Apr 11, 2016

I've created another PR with more concise changes to the latest version.

@jayagl jayagl closed this Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants