nodejs:在特定网络接口上使用jsftp

时间:2015-11-13 15:39:06

标签: node.js ftp

我正在使用jsftp

当我连接到互联网上的常规FTP服务器时,一切正常。 我想连接到本地网络上的serv,使用另一个网络接口,但我找不到jsftp的方法,我没有找到任何其他提供给我这样的ftp软件包。

无论如何我可以使用其他网络接口吗?

我做了这样的事情:

var Ftp = new JSFtp({
    host: "10.xxx.xxx.xxx",
    port: port,
    user: username,
    pass: password
});
Ftp.on('error', function(err){
    console.log(err);
});
Ftp.put(buff, filePath, function (err) {
    if (err) console.log(err);
});

我收到此错误:

{"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect"}

但是我可以使用curl连接shell,例如:

curl --interface anotherinterface ftp://10.xxx.xxx.xxx

0 个答案:

没有答案