lib/sockit/connection.rb in sockit-1.2.2 vs lib/sockit/connection.rb in sockit-1.2.3
- old
+ new
@@ -9,12 +9,10 @@
def connect(socket, host, port)
log(:yellow, "Connecting to SOCKS v#{config.version} server #{config.host}:#{config.port}")
# when doing proxy mode on SS5; we seemingly need to resolve all names first.
- if host !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/
- host = Resolv::DNS.new.getaddress(host).to_s
- end
+ host = Sockit.resolve(host)
data = case config.version.to_i
when 4 then
build_v4_connection_request(host, port)
when 5 then