socksify 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/socksify_ruby CHANGED
File without changes
data/doc/index.html CHANGED
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml1-strict.dtd">
3
3
 
4
- <html>
4
+ <html xmlns="http://www.w3.org/1999/xhtml">
5
5
  <head>
6
6
  <title>SOCKSify Ruby</title>
7
7
  <link rel="stylesheet" type="text/css" href="index.css"/>
@@ -40,7 +40,7 @@
40
40
  </p>
41
41
 
42
42
  <h2>Installation</h2>
43
- <pre>gem install socksify</pre>
43
+ <pre>$ gem install socksify</pre>
44
44
 
45
45
  <h2>Usage</h2>
46
46
 
@@ -80,7 +80,7 @@ rubyforge_www = TCPSocket.new("rubyforge.org", 80)
80
80
  The <a href="http://cthulhu.c3d2.de/~astro/gitweb/?p=socksify-ruby.git">repository</a>
81
81
  can be checked out with:
82
82
  </p>
83
- <pre>git-clone http://cthulhu.c3d2.de/~astro/git/socksify-ruby.git/</pre>
83
+ <pre>$ git-clone http://cthulhu.c3d2.de/~astro/git/socksify-ruby.git/</pre>
84
84
  <p>
85
85
  Send patches via E-Mail.
86
86
  </p>
data/lib/socksify.rb CHANGED
@@ -102,6 +102,12 @@ class TCPSocket
102
102
  def self.socks_port=(port)
103
103
  @@socks_port = port
104
104
  end
105
+ def self.socks_ignores
106
+ @@socks_ignores ||= []
107
+ end
108
+ def self.socks_ignores=(ignores)
109
+ @@socks_ignores = ignores
110
+ end
105
111
 
106
112
  alias :initialize_tcp :initialize
107
113
 
@@ -109,8 +115,9 @@ class TCPSocket
109
115
  def initialize(host=nil, port=0, local_host="0.0.0.0", local_port=0)
110
116
  socks_server = self.class.socks_server
111
117
  socks_port = self.class.socks_port
118
+ socks_ignores = self.class.socks_ignores
112
119
 
113
- if socks_server and socks_port
120
+ if socks_server and socks_port and not socks_ignores.include?(host)
114
121
  Socksify::debug_notice "Connecting to SOCKS server #{socks_server}:#{socks_port}"
115
122
  initialize_tcp socks_server, socks_port
116
123
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socksify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephan Maka
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-10 00:00:00 +01:00
12
+ date: 2008-04-17 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  requirements: []
53
53
 
54
54
  rubyforge_project: socksify
55
- rubygems_version: 1.0.1
55
+ rubygems_version: 1.1.1
56
56
  signing_key:
57
57
  specification_version: 2
58
58
  summary: Redirect all TCPSockets through a SOCKS5 proxy