THIS REPO HAS MOVED TO neo/net-ssh-socks
Switch branches/tags
Nothing to show
Pull request Compare This branch is 3 commits ahead, 5 commits behind kerryb:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/net/ssh
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
net-ssh-socks.gemspec

README.md

Net::SSH::Socks

Description

Net::SSH::Socks is a library for programmatically creating a SOCKS proxy server that tunnels through SSH. Similar to Net::SSH::Service::Forward#local except the host is dynamic (determined by the client application, such as a browser).

Useful for securing traffic over SSH or getting in/out of a firewall.

Use cases

  • If your company blocks certain sites/resources but allows SSH, then you can tunnel out to a machine outside the firewall.
  • If you need to access sites/resources inside a firewall, then you can tunnel into a machine inside the firewall.
  • Encrypt your traffic to protect yourself from things like Firesheep on public wifi.

Synopsis

require 'net/ssh/socks'

Net::SSH.start('host', 'user') do |ssh|
  ssh.forward.socks(8080)
  ssh.loop { true }
end

Now, configure your browser to use a SOCKS proxy at localhost:8080

Install

gem install net-ssh-socks