-
-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
We are currently using Socksify to proxy FTP connections through our SOCKS proxy. This has been working for years in Ruby 2.3 (and older versions.)
I've upgraded to Ruby 2.5 (and 2.4), and noticed that it no longer seems to proxy the FTP connections, while an HTTP connection will work fine. Here is some example code.
require 'socksify'
Socksify::debug = true
TCPSocket::socks_server = '...'
TCPSocket::socks_port = ...
require 'net/ftp'
require 'net/http'
Socksify::proxy('...', ...) do |soc|
uri = URI('https://api.ipify.org?format=json')
puts Net::HTTP.get(uri)
ftp = Net::FTP.new
ftp.debug_mode = true
ftp.connect('...', 21)
end
With the above code, I can see in the debug that it connects to the SOCKS proxy, and then to the HTTP example using the SOCKS proxy, but it does not for the FTP connection. Downgrading to 2.3 shows the proper behaviour of both connecting through the SOCKS proxy.
Metadata
Metadata
Assignees
Labels
No labels