Skip to content
kamu edited this page Sep 12, 2010 · 4 revisions

WANG in SOCKS

joux3 and myself were planning to implement some degree of SOCKS support, however I discovered a real gem of a gem called socksify Ruby.

Install the gem

gem install socksify

Simple usage

require 'rubygems'
require 'socksify'
require 'wang'

TCPSocket::socks_server = "127.0.0.1"
TCPSocket::socks_port = 1080
wang = WANG.new
code, header, source = wang.get("http://whatismyip.org/")

puts source

That’s all to it!

Clone this wiki locally