node-ftp
node-ftp copied to clipboard
how can i use ftp over system proxy
the ftp connect to server look like DIRECT.and i need use it over a proxy.
What kind of proxy?
SOCKS
such as
in fact, i use secureCRT and set the port forwarding to connect server for develop.
There is no built-in support for proxies. It would be easy to support passing in a (connected) socket to use for the control connection instead of creating a new TCP connection, but the problem is with data connections.
I'm not sure of the best way to support proxying of data connections while keeping the interface generic enough to support other proxies besides SOCKS. Maybe have a data connection handler function as a connection option that takes in a callback with an (err, socket)
signature so you can give a socket or at least a socket-like stream to the ftp
module? I dunno...
ok,thanks. i just try to find a way to let my develop can be esay.
Ftp I do not know much related technologies. But I'm curious how secureFX to deal with this problem.
Hello, is there any solution to use http proxy? I have problem with connection. It is working on another sftp where I am using ssh2-sftp-client package. But for ftp it is not working.
for sftp I am just passing sock: socket as NodeJS.ReadableStream
socket.connect(this.config.proxyPort, this.config.proxyHost, () =>
{
socket.write(`CONNECT ${this.config.host}:${this.config.port} HTTP/1.0\r\n\r\n`);
...