Sha256: 9003581c25b07e36b64bbdbcd3a8efda88c4c5c77b6a354d61e30a6042b661e5
Contents?: true
Size: 748 Bytes
Versions: 2
Compression:
Stored size: 748 Bytes
Contents
In addition to the HTTP proxy, Net::SSH also supports SOCKS proxies (both versions 4 and 5). Their usage is almost identical to the HTTP version (except SOCKS4 does not use passwords, just user names): [!figure lang=ruby,number=true,caption=Using SOCKS proxies require 'net/ssh' require 'net/ssh/proxy/socks4' require 'net/ssh/proxy/socks5' proxy_host = 'my.proxy.com' proxy_port = 1080 proxy_user = 'my-name' proxy_password = 'my-password' socks4 = Net::SSH::Proxy::SOCKS4.new( proxy_host, proxy_port, :user => proxy_user ) socks5 = Net::SSH::Proxy::SOCKS5.new( proxy_host, proxy_port, :user => proxy_user, :password => proxy_password) Net::SSH.start( 'host', :proxy => socks4 ) do |session| ... end !]
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
net-ssh-1.0.0 | doc/manual/parts/proxy_socks.txt |
net-ssh-0.9.0 | doc/manual/parts/proxy_socks.txt |