forward 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/forward/client.rb +5 -4
- data/lib/forward/version.rb +1 -1
- metadata +2 -2
data/lib/forward/client.rb
CHANGED
@@ -57,10 +57,9 @@ module Forward
|
|
57
57
|
|
58
58
|
Forward.log(:debug, "Starting remote forward at #{@tunnel.subdomain}.fwd.wf on port #{@tunnel.port}")
|
59
59
|
puts "Forwarding port #{@tunnel.hostport} at \033[04mhttps://#{@tunnel.subdomain}.fwd.wf\033[m\nCtrl-C to stop forwarding"
|
60
|
-
Net::SSH.start(@tunnel.tunneler, Forward.ssh_user, @client.ssh_options)
|
61
|
-
|
62
|
-
|
63
|
-
end
|
60
|
+
@session = Net::SSH.start(@tunnel.tunneler, Forward.ssh_user, @client.ssh_options)
|
61
|
+
@session.forward.remote(@tunnel.hostport, @tunnel.host, @tunnel.port)
|
62
|
+
@session.loop { watch_session(@session) }
|
64
63
|
|
65
64
|
rescue Net::SSH::AuthenticationFailed => e
|
66
65
|
Forward.log(:fatal, "SSH Auth failed `#{e}'")
|
@@ -72,6 +71,8 @@ module Forward
|
|
72
71
|
|
73
72
|
def self.cleanup_and_exit!(message = 'exiting...')
|
74
73
|
puts message
|
74
|
+
|
75
|
+
@session.close if @session && !@session.closed?
|
75
76
|
if @client && @client.tunnel && @client.tunnel.id
|
76
77
|
Forward.log(:debug, "Cleaning up tunnel: `#{@client.tunnel.id}'")
|
77
78
|
@client.tunnel.cleanup
|
data/lib/forward/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forward
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|