Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (21 sloc) 1.097 kb
f4d227c @igrigorik ack, rubygems collisions
authored
1 # Hydra5: load-balanced (multi-headed) SOCKS5 proxy
936da05 @igrigorik add readme
authored
2
f4d227c @igrigorik ack, rubygems collisions
authored
3 Given a list of hosts hydra5 opens a pool of SOCKS5 tunnels and routes incoming requests via a random tunnel. In effect, hydra5 is a regular SOCKS5 proxy, except that each outbound request is automatically load-balanced.
936da05 @igrigorik add readme
authored
4
feb4fdd @igrigorik fix image link
authored
5 ![hydra overview](https://github.com/igrigorik/hydra5/raw/master/misc/hydra.png)
936da05 @igrigorik add readme
authored
6
7 Hydra uses SSH to establish the SOCKS5 tunnels and [em-proxy](https://github.com/igrigorik/em-proxy) to provide the transparent routing for any SOCKS5 compatible client.
8
9 ## Getting started
10
11 ```
f4d227c @igrigorik ack, rubygems collisions
authored
12 $> gem install hydra5
e848e9a @igrigorik fix example in readme
authored
13 $> hydra5 --listen 8080 --hosts host1,host2 --key ssh_key.pub --user name --verbose
936da05 @igrigorik add readme
authored
14 ```
15
16 ```ruby
2062416 @igrigorik update readme
authored
17 c = Curl::Easy.new('http://jsonip.com')
936da05 @igrigorik add readme
authored
18 c.proxy_url = 'localhost:8080'
19 c.proxy_type = Curl::CURLPROXY_SOCKS5
2062416 @igrigorik update readme
authored
20
936da05 @igrigorik add readme
authored
21 c.perform
2062416 @igrigorik update readme
authored
22 c.body_str # => => {"ip":"72.52.131.237"}
936da05 @igrigorik add readme
authored
23
2062416 @igrigorik update readme
authored
24 c.perform
25 c.body_str # => => {"ip":"34.22.124.45"}
936da05 @igrigorik add readme
authored
26 ```
27
f4d227c @igrigorik ack, rubygems collisions
authored
28 Of course, you can also convert hydra5 into a proper HTTP proxy by deploying [privoxy](http://www.privoxy.org/) or an equivalent tool in front.
2062416 @igrigorik update readme
authored
29
936da05 @igrigorik add readme
authored
30 ## License
31
32 The MIT License - Copyright (c) 2011 Ilya Grigorik
Something went wrong with that request. Please try again.