lib/sockit/v5/authentication.rb in sockit-1.0.5 vs lib/sockit/v5/authentication.rb in sockit-1.0.6
- old
+ new
@@ -46,13 +46,13 @@
if server_socks_version != config.version
raise SockitError, "SOCKS server does not support version #{config.version}!"
end
if server_auth_method == 0xFF
- raise SockitError, authentication_method(server_auth_method)
+ raise SockitError, build_v5_authentication_method_message(server_auth_method)
else
- log(:green, authentication_method(server_auth_method))
+ log(:green, build_v5_authentication_method_message(server_auth_method))
end
# The subsequent authentication is method-dependent. Username and password authentication (method 0x02) is described in RFC 1929:
case server_auth_method
when 0x00 then
@@ -89,12 +89,12 @@
dump(:read, auth_reply)
version = auth_reply[0]
status_code = auth_reply[1]
if status_code == 0x00
- log(:green, authentication_status(status_code))
+ log(:green, build_v5_authentication_status_message(status_code))
else
- raise SockitError, authentication_status(status_code)
+ raise SockitError, build_v5_authentication_status_message(status_code)
end
end
log(:green, "Authenticated to SOCKS server #{config.host}:#{config.port}")
end