remailer 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.3
1
+ 0.4.4
@@ -325,9 +325,23 @@ class Remailer::Connection < EventMachine::Connection
325
325
  debug_notification(:timeout, "Response timed out")
326
326
  send_callback(:on_error)
327
327
  elsif (!@connected)
328
- connect_notification(false, "Timed out before a connection could be established")
329
- debug_notification(:timeout, "Timed out before a connection could be established")
330
- error_notification(:timeout, "Timed out before a connection could be established")
328
+ remote_options = @options
329
+
330
+ case (@interpreter)
331
+ when Remailer::Connection::Socks5Interpreter
332
+ remote_options = @options[:proxy]
333
+ end
334
+
335
+ message = "Timed out before a connection could be established to #{remote_options[:host]}:#{remote_options[:port]}"
336
+
337
+ if (@interpreter)
338
+ message << " using #{@interpreter.label}"
339
+ end
340
+
341
+ connect_notification(false, message)
342
+ debug_notification(:timeout, message)
343
+ error_notification(:timeout, message)
344
+
331
345
  send_callback(:on_error)
332
346
  else
333
347
  send_callback(:on_disconnect)
@@ -108,18 +108,18 @@ class Remailer::Connection::Socks5Interpreter < Remailer::Interpreter
108
108
  end
109
109
 
110
110
  parse do |s|
111
- return unless (s.length >= 10)
112
-
113
- version, reply, reserved, address_type, address, port = s.slice!(0,10).unpack('CCCCNn')
111
+ if (s.length >= 10)
112
+ version, reply, reserved, address_type, address, port = s.slice!(0,10).unpack('CCCCNn')
114
113
 
115
- [
116
- reply,
117
- {
118
- :address => address,
119
- :port => port,
120
- :address_type => address_type
121
- }
122
- ]
114
+ [
115
+ reply,
116
+ {
117
+ :address => address,
118
+ :port => port,
119
+ :address_type => address_type
120
+ }
121
+ ]
122
+ end
123
123
  end
124
124
 
125
125
  interpret(0) do
data/remailer.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{remailer}
8
- s.version = "0.4.3"
8
+ s.version = "0.4.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Scott Tadman"]
12
- s.date = %q{2011-03-02}
12
+ s.date = %q{2011-03-03}
13
13
  s.description = %q{EventMachine SMTP Mail User Agent}
14
14
  s.email = %q{scott@twg.ca}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: remailer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.3
5
+ version: 0.4.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Scott Tadman
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-02 00:00:00 -05:00
13
+ date: 2011-03-03 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency