关于nodejs ftp上传文件 如何用socksv5代理上传
发布于 6 年前 作者 chong0808 3059 次浏览 来自 问答

问题是这样的,现在需要把文件通过ftp上传文件,然后我使用的这个库 jsftp 但是按照示例直接连接连接不上,然后又说用 socksv5代理上传,这个是什么意思?

const Ftp = new jsftp({
        host: "ip",
        port: 21, // defaults to 21
        user: "user", // defaults to "anonymous"
        pass: "passw", // defaults to "@anonymous"
        createSocket: ({ port, host }, firstAction) => {
            return SocksClient.createConnection({
                proxy: {
                    ipaddress: 'ip',
                    port: 8833,
                    type: 5
                },

                command: 'connect',

                destination: {
                    host,
                    port
                }
            })
        }

这样连接还是连接不上 求社区大神指教指教 谢谢

回到顶部