pipe2me-client 0.2.3 → 0.2.4
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.
- checksums.yaml +4 -4
- data/README.mdown +15 -17
- data/lib/pipe2me/cli.rb +2 -2
- data/lib/pipe2me/tunnel.rb +1 -1
- data/lib/pipe2me/version.rb +2 -2
- data/test/auth-token-test.sh +1 -1
- data/test/env-test.sh +1 -1
- data/test/monitrc-test.sh +1 -1
- data/test/opensslkey-test.sh +1 -1
- data/test/setup-test.sh +2 -2
- data/test/sshkey-test.sh +1 -1
- data/test/testhelper.debug +1 -1
- data/test/testhelper.release +1 -1
- data/test/verify-test.sh +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a009fe77ae2b8d681d0424c93b2d6102e3e4381
|
4
|
+
data.tar.gz: 70a60b699c148d9223685ef7a0f6f05c9c52d2df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 291f0bf6ad7946006b983d12cb8af281fa60e0ad72b195d4a5f6d2b519f28a65746c684a61aacf32c1f6727e4835c8e6a4d0babe108f1d65522c779f65f72df5
|
7
|
+
data.tar.gz: 216b17a55e96a6b4e3a1cc56b6ea5f40cfeaae3707b0f78245b708b9d4c877097be3820ef0d7867a9e37604686ff35eaddf05fc01b241450b4c5d673ad0cb395
|
data/README.mdown
CHANGED
@@ -17,7 +17,7 @@ Mini-example: This registers two tunnels with a single hostname for
|
|
17
17
|
two services on localhost (http on port 9090, https on port 9091).
|
18
18
|
|
19
19
|
# Setup tunnels. This responds with the domain name
|
20
|
-
> ./bin/pipe2me setup -p http,https --server http://pipe2.me --
|
20
|
+
> ./bin/pipe2me setup -p http,https --server http://test.pipe2.me:8080 --token review@pipe2me --ports 9090,9091
|
21
21
|
pretty-ivory-horse.test.pipe2.me
|
22
22
|
|
23
23
|
# Review the assigned URLs:
|
@@ -55,36 +55,34 @@ Before submitting a pull request you should also run a test against the
|
|
55
55
|
test.pipe2.me instance, which is available most of the time for that purpose.
|
56
56
|
To do that, run `rake test:release`.
|
57
57
|
|
58
|
-
##
|
58
|
+
## Tunnel tokens
|
59
59
|
|
60
60
|
As ports and domain names are sparse resources the pipe2me server API
|
61
61
|
requires the use of authorization tokens when requesting a tunnel. A
|
62
|
-
token is similar to a currency in that it describes which tunnels are
|
63
|
-
supported.
|
64
|
-
for those ports, whether or not a certificate is
|
65
|
-
by a regular CA, etc.
|
62
|
+
token is similar to a 'currency' in that it describes which tunnels are
|
63
|
+
supported. A token could limit the number of ports that can be tunnelled,
|
64
|
+
the amount of traffic for those ports, whether or not a certificate is
|
65
|
+
self-signed or signed by a regular CA, etc.
|
66
|
+
|
66
67
|
|
67
68
|
The features of a token are not defined within this protocol. However,
|
68
69
|
there has to be one. Contact the administrator of the pipe2me server
|
69
70
|
to know more.
|
70
71
|
|
71
|
-
|
72
|
-
|
73
|
-
|
72
|
+
A freshly installed pipe2me server comes with a number of preconfigured tokens.
|
73
|
+
Of course, a server admin should (and probably would) change those tokens.
|
74
|
+
However, as a test target, the pipe2me test server at http://test.pipe2.me:8080
|
75
|
+
supports these tokens:
|
74
76
|
|
75
|
-
-
|
77
|
+
- `test@pipe2me`: this builds tunnels that are available for 5 minutes.
|
76
78
|
The test token is intended for use with automated test scenarios.
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
package. The current review token is `review@test.kinko.me`.
|
79
|
+
- `review@pipe2me`: this builds tunnels that are available for up to
|
80
|
+
one day. A review token should help you get a feel for the pipe2me
|
81
|
+
package.
|
81
82
|
|
82
83
|
If you need a longer lived token for development, review and/or test
|
83
84
|
feel free to contact us at contact@kinko.me.
|
84
85
|
|
85
|
-
If you want to use pipe2me for any practical purpose consider
|
86
|
-
signing up at https://pipe2.me, which should be online end of January.
|
87
|
-
|
88
86
|
## Licensing
|
89
87
|
|
90
88
|
**The pipe2me client software** is (c) The Kinko Team, 2014 and released to you
|
data/lib/pipe2me/cli.rb
CHANGED
@@ -36,8 +36,8 @@ class Pipe2me::CLI < Thor
|
|
36
36
|
end
|
37
37
|
|
38
38
|
desc "setup", "fetch a new tunnel setup"
|
39
|
-
option :server, :default => "http://test.pipe2.me:8080"
|
40
|
-
option :
|
39
|
+
option :server, :aliases => :s, :default => "http://test.pipe2.me:8080"
|
40
|
+
option :token, :required => true # "tunnel token"
|
41
41
|
option :protocols, :default => "https" # "protocol names, e.g. 'http,https,imap'"
|
42
42
|
option :ports, :type => :string # "local ports, one per protocol"
|
43
43
|
def setup
|
data/lib/pipe2me/tunnel.rb
CHANGED
@@ -31,7 +31,7 @@ module Pipe2me::Tunnel
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# [todo] escape auth option
|
34
|
-
response = HTTP.post! "#{Pipe2me::Config.server}/tunnels/#{options[:
|
34
|
+
response = HTTP.post! "#{Pipe2me::Config.server}/tunnels/#{options[:token]}",
|
35
35
|
"protocols" => options[:protocols]
|
36
36
|
|
37
37
|
server_info = ShellFormat.parse(response)
|
data/lib/pipe2me/version.rb
CHANGED
data/test/auth-token-test.sh
CHANGED
@@ -4,7 +4,7 @@ describe "fails on invalid and missing auth"
|
|
4
4
|
. $(dirname $1)/testhelper.inc
|
5
5
|
|
6
6
|
it_fails_on_invalid_auth() {
|
7
|
-
! $pipe2me setup --server $pipe2me_server --
|
7
|
+
! $pipe2me setup --server $pipe2me_server --token $pipe2me_token.invalid
|
8
8
|
}
|
9
9
|
|
10
10
|
it_fails_on_missing_auth_token() {
|
data/test/env-test.sh
CHANGED
@@ -4,7 +4,7 @@ describe "show pipe2me environment"
|
|
4
4
|
. $(dirname $1)/testhelper.inc
|
5
5
|
|
6
6
|
it_start_a_tunnel() {
|
7
|
-
fqdn=$($pipe2me setup --server $pipe2me_server --
|
7
|
+
fqdn=$($pipe2me setup --server $pipe2me_server --token $pipe2me_token)
|
8
8
|
$pipe2me env > env
|
9
9
|
echo "== env is ============="
|
10
10
|
cat env
|
data/test/monitrc-test.sh
CHANGED
@@ -13,7 +13,7 @@ it_works_with_monitrc() {
|
|
13
13
|
|
14
14
|
it_creates_a_monitrc_file() {
|
15
15
|
! [ -e pipe2me.monitrc ]
|
16
|
-
fqdn=$($pipe2me setup --server $pipe2me_server --
|
16
|
+
fqdn=$($pipe2me setup --server $pipe2me_server --token $pipe2me_token)
|
17
17
|
|
18
18
|
$pipe2me monitrc
|
19
19
|
[ -e pipe2me.monitrc ]
|
data/test/opensslkey-test.sh
CHANGED
@@ -5,7 +5,7 @@ describe "openssl tests"
|
|
5
5
|
|
6
6
|
# setup creates and signs openssl credentials
|
7
7
|
it_sets_up_openssl_certs() {
|
8
|
-
fqdn=$($pipe2me setup --server $pipe2me_server --
|
8
|
+
fqdn=$($pipe2me setup --server $pipe2me_server --token $pipe2me_token)
|
9
9
|
test -f pipe2me.openssl.priv
|
10
10
|
cat pipe2me.openssl.priv | grep "BEGIN RSA PRIVATE KEY"
|
11
11
|
|
data/test/setup-test.sh
CHANGED
@@ -5,7 +5,7 @@ describe "tunnel setup"
|
|
5
5
|
|
6
6
|
# setup a tunnel
|
7
7
|
it_sets_up_tunnels() {
|
8
|
-
fqdn=$($pipe2me setup --server $pipe2me_server --
|
8
|
+
fqdn=$($pipe2me setup --server $pipe2me_server --token $pipe2me_token --ports 8100,8101 --protocols http,https)
|
9
9
|
|
10
10
|
# pipe2me setup --server $pipe2me_server returns the fqdn of the subdomain and nothing else
|
11
11
|
test 1 -eq $(echo $fqdn | wc -l)
|
@@ -14,5 +14,5 @@ it_sets_up_tunnels() {
|
|
14
14
|
echo $fqdn | grep \.pipe2\.dev
|
15
15
|
|
16
16
|
# Cannot setup a second tunnel in the same directory.
|
17
|
-
! $pipe2me setup --server $pipe2me_server --
|
17
|
+
! $pipe2me setup --server $pipe2me_server --token $pipe2me_token
|
18
18
|
}
|
data/test/sshkey-test.sh
CHANGED
@@ -4,7 +4,7 @@ describe "ssh key creation"
|
|
4
4
|
. $(dirname $1)/testhelper.inc
|
5
5
|
|
6
6
|
it_sets_up_ssh_identity() {
|
7
|
-
fqdn=$($pipe2me setup --server $pipe2me_server --
|
7
|
+
fqdn=$($pipe2me setup --server $pipe2me_server --token $pipe2me_token)
|
8
8
|
test -f pipe2me.id_rsa.pub
|
9
9
|
test -f pipe2me.id_rsa
|
10
10
|
|
data/test/testhelper.debug
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
pipe2me_server=http://pipe2.dev:8080
|
2
|
-
pipe2me_token=test@
|
2
|
+
pipe2me_token=test@pipe2me
|
data/test/testhelper.release
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
pipe2me_server=http://pipe2.dev:8080
|
2
|
-
pipe2me_token=test@
|
2
|
+
pipe2me_token=test@pipe2me
|
data/test/verify-test.sh
CHANGED
@@ -5,7 +5,7 @@ describe "verify subcommand"
|
|
5
5
|
|
6
6
|
# setup a tunnel
|
7
7
|
it_sets_up_tunnels_and_verifies() {
|
8
|
-
fqdn=$($pipe2me setup --server $pipe2me_server --
|
8
|
+
fqdn=$($pipe2me setup --server $pipe2me_server --token short@pipe2me)
|
9
9
|
|
10
10
|
# pipe2me setup --server $pipe2me_server returns the fqdn of the subdomain and nothing else
|
11
11
|
test 1 -eq $(echo $fqdn | wc -l)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipe2me-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- radiospiel
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description:
|
69
|
+
description: pipe2me command line client V0.2.4; (c) The kink team, 2013, 2014.
|
70
70
|
email: contact@kinko.me
|
71
71
|
executables:
|
72
72
|
- pipe2me
|
@@ -131,5 +131,5 @@ rubyforge_project:
|
|
131
131
|
rubygems_version: 2.2.1
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
|
-
summary:
|
134
|
+
summary: pipe2me command line client V0.2.4; (c) The kink team, 2013, 2014.
|
135
135
|
test_files: []
|