Skip to content

Conversation

@gbourel
Copy link

@gbourel gbourel commented Mar 14, 2017

Add a connection option which allows to use FTP active mode instead of default passive behavior.

The passive option on connect allows to select FTP mode between active or passive:

  • default value is set to true in order to keep same behavior when this option isn't set.
  • when passive is set to true, this FTP client uses active mode, by using the PORT command to trigger a socket connection set up from the FTP server. In order to ensure IP address which should be reached for this connection the activeIp option may be set to define which IP the FTP server must use when initiating this connection.

@748890753yiyi
Copy link

eg:
var ftpClient = new ftp();
ftpClient.connect({
host: '',
port: 21,
user: '
',
password: '',
passive:false,
activeIp:"
"
});
ftpClient.on('ready', function () {
console.log("ready");//this is right
ftpClient.list(dir, function (err, list) {//This list function has no return value
if (err) throw err;
console.dir(list);
ftpClient.end();

    });
});

I use this active mode in my ftp module, but ftpClient.list function has no return value, ready can be show,

@lroal
Copy link

lroal commented Feb 9, 2018

Any news on active mode ?

@lracicot
Copy link

Can this be merged? We need this on some networks.

@rk-7
Copy link

rk-7 commented Sep 16, 2019

Anyone maintaining this PR?

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