Class Net::SSH::Proxy::SOCKS5
In: lib/net/ssh/proxy/socks5.rb
Parent: Object

An implementation of a socket factory that returns a socket which will tunnel the connection through a SOCKS5 proxy. It allows explicit specification of the user and password, but if none are given it will look in the SOCKS_USER/SOCKS_PASSWORD and CONNECT_USER/CONNECT_PASSWORD environment variables as well.

Methods

new   open  

Constants

SOCKS_VERSION = 5
SOCKS_METHOD_NO_AUTH = 0
SOCKS_METHOD_GSSAPI = 1
SOCKS_METHOD_PASSWD = 2
SOCKS_METHOD_NONE = 0xFF
SOCKS_CMD_CONNECT = 1
SOCKS_ATYP_IPV4 = 1
SOCKS_ATYP_DOMAIN = 3
SOCKS_ATYP_IPV6 = 4
SOCKS_SUCCESS = 0
SOCKS_FAILURE = 1
SOCKS_NOT_ALLOWED = 2
SOCKS_NETWORK_UNREACHABLE = 3
SOCKS_HOST_UNREACHABLE = 4
SOCKS_REFUSED = 5
SOCKS_TTL_EXPIRED = 6
SOCKS_CMD_NOT_SUPPORTED = 7
SOCKS_ADDR_NOT_SUPPORTED = 8

Public Class methods

Create a new proxy connection to the given proxy host and port. Optionally, @:user@ and @:password@ options may be given to identify the username and password with which to authenticate.

Public Instance methods

Return a new socket connected to the given host and port via the proxy that was requested when the socket factory was instantiated.

[Validate]