zerg 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1 @@
1
+ v0.0.1. Claims the 'zerg' gem name.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2008 Victor Costan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Manifest ADDED
@@ -0,0 +1,7 @@
1
+ ext/zerg_setup_hook/extconf.rb
2
+ CHANGELOG
3
+ LICENSE
4
+ bin/zerg
5
+ README
6
+ Rakefile
7
+ Manifest
data/README ADDED
@@ -0,0 +1,61 @@
1
+ INSTALL
2
+ -
3
+
4
+ on server and local machine:
5
+
6
+ `gem sources -a http://gems.github.com`
7
+
8
+ `sudo gem install coderrr-rtunnel`
9
+
10
+ If you don't have root access on server, you can use either the rtunnel_server_linux binary (only works with linux), or extract the .tar.gz and use `rtunnel_server.rb` (all function the same)
11
+
12
+ USAGE
13
+ -
14
+
15
+ on server (myserver.com):
16
+
17
+ `rtunnel_server`
18
+
19
+ on your local machine:
20
+
21
+ `rtunnel_client -c myserver.com -f 4000 -t 3000`
22
+
23
+ This would reverse tunnel myserver.com:4000 to localhost:3000 so that if you had a web server running at port 3000 on your local machine, anyone on the internet could access it by going to http://myserver.com:4000
24
+
25
+ **News**
26
+
27
+ * 0.3.6 released, new protocol
28
+ * created gem for easier installation
29
+ * 0.2.1 released, minor bugfix, cmdline options change
30
+ * 0.2.0 released, much simpler
31
+ * 0.1.2 released
32
+ * Created rtunnel_server binary for linux so you don't need Ruby installed on the host you want to reverse tunnel from
33
+ * 0.1.1 released
34
+ * Added default control port of 19050, no longer have to specify this on client or server unless you care to change it
35
+
36
+ RTunnel?
37
+ -
38
+
39
+ This client/server allow you to reverse tunnel traffic. Reverse tunneling is useful if you want to run a server behind a NAT and you do not have the ability use port forwarding. The specific reason I created this program was to reduce the pain of Facebook App development on a crappy internet connection that drops often. ssh -R was not cutting it.
40
+
41
+ **How does reverse tunneling work?**
42
+
43
+ * tunnel\_client makes connection to tunnel\_server (through NAT)
44
+ * tunnel_server listens on port X
45
+ * internet_user connects to port X on tunnel server
46
+ * tunnel\_server uses existing connection to tunnel internet user's request back to tunnel\_client
47
+ * tunnel_client connects to local server on port Y
48
+ * tunnel_client tunnels internet users connection through to local server
49
+
50
+ or:
51
+
52
+ * establish connection: tunnel\_client --NAT--> tunnel\_server
53
+ * reverse tunnel: internet\_user -> tunnel_server --(NAT)--> tunnel\_client -> server\_running\_behind\_nat
54
+
55
+ **How is this different than normal tunneling?**
56
+
57
+ With tunneling, usually your connections are made in the same direction you create the tunnel connection. With reverse tunneling, you tunnel your connections the opposite direction of which you made the tunnel connection. So you initiate the tunnel with A -> B, but connections are tunneled from B -> A.
58
+
59
+ **Why not just use ssh -R?**
60
+
61
+ The same thing can be achieved with ssh -R, why not just use it? A lot of ssh servers don't have the GatewayPorts sshd option set up to allow you to reverse tunnel. If you are not in control of the server and it is not setup correctly then you are SOL. RTunnel does not require you are in control of the server. ssh -R has other annoyances. When your connection drops and you try to re-initiate the reverse tunnel sometimes you get an address already in use error because the old tunnel process is still laying around. This requires you to kill the existing sshd process. RTunnel does not have this problem.
data/Rakefile ADDED
@@ -0,0 +1,26 @@
1
+ require 'rubygems'
2
+ gem 'echoe'
3
+ require 'echoe'
4
+
5
+ Echoe.new('zerg') do |p|
6
+ p.project = 'rails-pwnage' # rubyforge project
7
+
8
+ p.author = 'Victor Costan'
9
+ p.email = 'victor@zergling.net'
10
+ p.summary = 'Umbrella gem for the Zergling tools.'
11
+ p.url = 'http://www.zergling.net'
12
+ p.dependencies = ['zerg_support >=0.0.1']
13
+ p.extensions = ['ext/zerg_setup_hook/extconf.rb']
14
+ p.eval = proc do |p|
15
+ p.default_executable = 'bin/rpwn'
16
+ end
17
+
18
+ p.need_tar_gz = true
19
+ p.need_zip = true
20
+ p.rdoc_pattern = /^(lib|bin|tasks|ext)|^BUILD|^README|^CHANGELOG|^TODO|^LICENSE|^COPYING$/
21
+ end
22
+
23
+ if $0 == __FILE__
24
+ Rake.application = Rake::Application.new
25
+ Rake.application.run
26
+ end
data/bin/zerg ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ print "Hello zerg!\n"
@@ -0,0 +1,12 @@
1
+ # this file is invoked when the gem is installed
2
+ # rubygems expects it to build a gem, so we need to work around that
3
+
4
+ require 'rubygems'
5
+ gem 'zerg_support'
6
+ require 'zerg_support'
7
+
8
+ Zerg::Support::Gems.ensure_on_path 'zerg'
9
+ # we really shouldn't be abusing rubygems' root; then again, the Debian
10
+ # maintainers shouldn't be abusing the patience of Ruby developers
11
+
12
+ Zerg::Support::Gems.emulate_extension_install 'zerg_setup'
data/zerg.gemspec ADDED
@@ -0,0 +1,40 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{zerg}
5
+ s.version = "0.0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Victor Costan"]
9
+ s.date = %q{2008-11-12}
10
+ s.default_executable = %q{bin/rpwn}
11
+ s.description = %q{Umbrella gem for the Zergling tools.}
12
+ s.email = %q{victor@zergling.net}
13
+ s.executables = ["zerg"]
14
+ s.extensions = ["ext/zerg_setup_hook/extconf.rb"]
15
+ s.extra_rdoc_files = ["ext/zerg_setup_hook/extconf.rb", "CHANGELOG", "LICENSE", "bin/zerg", "README"]
16
+ s.files = ["ext/zerg_setup_hook/extconf.rb", "CHANGELOG", "LICENSE", "bin/zerg", "README", "Rakefile", "Manifest", "zerg.gemspec"]
17
+ s.has_rdoc = true
18
+ s.homepage = %q{http://www.zergling.net}
19
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Zerg", "--main", "README"]
20
+ s.require_paths = ["ext"]
21
+ s.rubyforge_project = %q{rails-pwnage}
22
+ s.rubygems_version = %q{1.3.1}
23
+ s.summary = %q{Umbrella gem for the Zergling tools.}
24
+
25
+ if s.respond_to? :specification_version then
26
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
27
+ s.specification_version = 2
28
+
29
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
30
+ s.add_runtime_dependency(%q<zerg_support>, [">= 0.0.1"])
31
+ s.add_development_dependency(%q<echoe>, [">= 0"])
32
+ else
33
+ s.add_dependency(%q<zerg_support>, [">= 0.0.1"])
34
+ s.add_dependency(%q<echoe>, [">= 0"])
35
+ end
36
+ else
37
+ s.add_dependency(%q<zerg_support>, [">= 0.0.1"])
38
+ s.add_dependency(%q<echoe>, [">= 0"])
39
+ end
40
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: zerg
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Victor Costan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-11-12 00:00:00 -05:00
13
+ default_executable: bin/rpwn
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: zerg_support
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.1
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: echoe
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ description: Umbrella gem for the Zergling tools.
36
+ email: victor@zergling.net
37
+ executables:
38
+ - zerg
39
+ extensions:
40
+ - ext/zerg_setup_hook/extconf.rb
41
+ extra_rdoc_files:
42
+ - ext/zerg_setup_hook/extconf.rb
43
+ - CHANGELOG
44
+ - LICENSE
45
+ - bin/zerg
46
+ - README
47
+ files:
48
+ - ext/zerg_setup_hook/extconf.rb
49
+ - CHANGELOG
50
+ - LICENSE
51
+ - bin/zerg
52
+ - README
53
+ - Rakefile
54
+ - Manifest
55
+ - zerg.gemspec
56
+ has_rdoc: true
57
+ homepage: http://www.zergling.net
58
+ post_install_message:
59
+ rdoc_options:
60
+ - --line-numbers
61
+ - --inline-source
62
+ - --title
63
+ - Zerg
64
+ - --main
65
+ - README
66
+ require_paths:
67
+ - ext
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: "0"
73
+ version:
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: "1.2"
79
+ version:
80
+ requirements: []
81
+
82
+ rubyforge_project: rails-pwnage
83
+ rubygems_version: 1.3.1
84
+ signing_key:
85
+ specification_version: 2
86
+ summary: Umbrella gem for the Zergling tools.
87
+ test_files: []
88
+