【发布时间】:2018-07-25 02:46:03
【问题描述】:
我正在寻找通过 HTTP-Proxy-Server 连接 FTP-Server 的机会。我尝试了不同的 npm 包(jsftp、ftp 等),但连接不起作用。我尝试了一些 SOCKS 包,但它们似乎已经过时了。这是来自 jsftp 包的示例。不幸的是,该示例不起作用,我找不到任何解决方案
const {SocksClient} = require('socks');
const ftp = new Ffp({
host: 'localhost',
port: 3333,
user: 'user',
pass: 'password',
createSocket: ({port, host}, firstAction) => {
return SocksClient.createConnection({
proxy: {
ipaddress: '159.203.75.200'
port: 1080,
type: 5
},
command: 'connect',
destination: {
host,
port
}
})
}
})
【问题讨论】: