I am using the ruby ββNet :: FTP library to connect to an FTP server and upload files. Everything works fine, but now I need to use an outgoing proxy, as their firewall assigns white IP addresses, and I use Heroku to host the site. I am testing a new Proximo add-on that looks promising, but I cannot use Net :: FTP to use it.
I see the following in Net :: FTP docs :
connect (host, port = FTP_PORT)
Establishes an FTP connection with the host, optionally overriding the default port. If the SOCKS_SERVER environment variable is set, a connection is established through the SOCKS proxy server. Throws an exception (usually Errno :: ECONNREFUSED) if the connection cannot be established.
But trying to set this environment variable or setting ENV['SOCKS_SERVER'] = proximo_url
does not work either. Does anyone know how to do this correctly? It does not have to be a SOCKS proxy, an HTTP proxy will do, but I'm not sure the Net :: FTP library supports this.
... after some research ...
I found that Net :: FTP is looking for a class called SOCKSSocket
, for which I found these documents . But I canβt turn it on. include 'socket'
returns false, which, I am sure, means that it is already loaded.
source share