pipe2me-client 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8eceaa5c69187b15f7b43b0fe2cdbe1dd9b7281f
4
- data.tar.gz: ca812510cb4937691876f1fc8b5642b50cea853d
3
+ metadata.gz: aea15364dda99c7a242eb34318206a44b3565213
4
+ data.tar.gz: 33527a1e0d1817ddcc04ba0a798bd573e1def867
5
5
  SHA512:
6
- metadata.gz: ee65b0e72ff5c66bb7bca14a7c2724a0e7f1717b33696d0b9aaf1aa1f7a87b1a8ea78cffab3f4d08df416a6dcf17c1f72d13db195a3be7037da69194193dedfe
7
- data.tar.gz: 7fa92f1490c22365e4a8ca87f0ed4480429923694ba24d6c2ac897db6f37162ca64b1fc7493b67698342951d881364386aa6761d67afcc97cd958f127247dd90
6
+ metadata.gz: cb06a677dc3bc15419751ff34234a2ede56b82830ca87cca72665deb17a5b1041b008f5016657cc72d5b02eae563641d955a8e4d80f654cc5f03cfde4da0d795
7
+ data.tar.gz: f71501c3301136a3cdccbd14501b88ba60836fbc9fd5c9a8344c81fac792588e033344ab675f31b190073f4987d6dabd7710dd4bf2776b0a810eaf4b7f378744
@@ -23,17 +23,11 @@ class Pipe2me::CLI < Thor
23
23
 
24
24
  private
25
25
 
26
- def which!(cmd)
27
- path = `which #{cmd}`.chomp
28
- raise "Cannot find #{cmd} in your $PATH. Is it installed?" if path == ""
29
- path
30
- end
31
-
32
26
  def create_monitrc
33
27
  path = options[:echo] ? "pipe2me.monitrc.echo" : "pipe2me.monitrc"
34
28
 
35
29
  # The daemon binary
36
- daemon = "#{which! :daemon} -D #{File.expand_path(Dir.getwd)}"
30
+ daemon = "#{Which.DAEMON} -D #{File.expand_path(Dir.getwd)}"
37
31
 
38
32
  port = options[:port]
39
33
 
data/lib/pipe2me/cli.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "thor"
2
+ require_relative "which"
2
3
 
3
4
  class Pipe2me::CLI < Thor
4
5
  class_option :dir, :type => :string
@@ -9,6 +9,8 @@ module Pipe2me::Tunnel
9
9
 
10
10
  SSH_PUBKEY = "pipe2me.id_rsa.pub"
11
11
  SSH_PRIVKEY = "pipe2me.id_rsa"
12
+
13
+ SSH_CONFIG = "pipe2me.ssh_config"
12
14
  end
13
15
 
14
16
  require_relative "tunnel/openssl"
@@ -84,5 +86,8 @@ module Pipe2me::Tunnel
84
86
  unless File.exists?(SSL_CERT)
85
87
  ssl_certsign
86
88
  end
89
+ unless File.exists?(SSH_CONFIG)
90
+ FileUtils.cp "#{File.dirname(__FILE__)}/tunnel/ssh_config", SSH_CONFIG
91
+ end
87
92
  end
88
93
  end
@@ -44,19 +44,12 @@ module Pipe2me::Tunnel::Commands
44
44
 
45
45
  private
46
46
 
47
- def which!(cmd)
48
- path = `which #{cmd}`.chomp
49
- raise "Cannot find #{cmd} in your $PATH. Is it installed?" if path == ""
50
- path
51
- end
52
-
53
47
  def port_tunnel_command(tunnel_uri, protocol, remote_port, local_port)
54
- autossh = which! :autossh
55
-
56
48
  cmd = <<-SHELL
57
49
  env AUTOSSH_GATETIME=0 # comments work here..
58
- #{autossh}
50
+ #{Which.AUTOSSH}
59
51
  -M 0
52
+ -F #{T::SSH_CONFIG}
60
53
  #{tunnel_uri.user}@#{tunnel_uri.host}
61
54
  -p #{tunnel_uri.port}
62
55
  -R 0.0.0.0:#{remote_port}:localhost:#{local_port}
@@ -0,0 +1,99 @@
1
+ # $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $
2
+
3
+ # This is the ssh client system-wide configuration file. See
4
+ # ssh_config(5) for more information. This file provides defaults for
5
+ # users, and the values can be changed in per-user configuration files
6
+ # or on the command line.
7
+
8
+ # Configuration data is parsed as follows:
9
+ # 1. command line options
10
+ # 2. user-specific file
11
+ # 3. system-wide file
12
+ # Any configuration value is only changed the first time it is set.
13
+ # Thus, host-specific definitions should be at the beginning of the
14
+ # configuration file, and defaults at the end.
15
+
16
+ # Site-wide defaults for some commonly used options. For a comprehensive
17
+ # list of available options, their meanings and defaults, please see the
18
+ # ssh_config(5) man page.
19
+
20
+ Host *
21
+ SendEnv LANG LC_*
22
+
23
+ # Configuration options and default values (see ssh_config(5) for their meaning):
24
+ #
25
+ # Host # (no default)
26
+ # AddressFamily any
27
+ # AskPassGUI yes # (Apple only)
28
+ # BatchMode no
29
+ # BindAddress # (no default)
30
+ # ChallengeResponseAuthentication yes
31
+ # CheckHostIP yes
32
+ # Cipher 3des
33
+ # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour
34
+ # ClearAllForwardings no
35
+ # Compression no
36
+ # CompressionLevel 6
37
+ # ConnectionAttempts 1
38
+ # ConnectTimeout # (no default)
39
+ # ControlMaster no
40
+ # ControlPath # (no default)
41
+ # ControlPersist no
42
+ # DynamicForward
43
+ # EnableSSHKeysign no
44
+ # EscapeChar ~
45
+ # ExitOnForwardFailure no
46
+ # ForwardAgent no
47
+ # ForwardX11 no
48
+ # ForwardX11Timeout 1200
49
+ # ForwardX11Trusted no
50
+ # XauthLocation xauth # Default is to search $PATH. It is recommended that a full path be provided.
51
+ # GatewayPorts no
52
+ # GlobalKnownHostsFile /etc/ssh/ssh_known_hosts,/etc/ssh/ssh_known_hosts2
53
+ # GSSAPIAuthentication no
54
+ # GSSAPIDelegateCredentials no
55
+ # GSSAPIKeyExchange no
56
+ # GSSAPITrustDNS no
57
+ # HashKnownHosts no
58
+ # HostbasedAuthentication no
59
+ # HostKeyAlgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss
60
+ # HostKeyAlias # (no default)
61
+ # HostName # (set by command at run-time)
62
+ # IdentitiesOnly no
63
+ # IdentityFile .ssh/id_rsa,.ssh/id_dsa
64
+ # IPQoS lowdelay
65
+ # KbdInteractiveAuthentication yes
66
+ # KbdInteractiveDevices # (no default)
67
+ # KexAlgorithms ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
68
+ # LocalCommand # (no default)
69
+ # LocalForward # (no default)
70
+ # LogLevel INFO
71
+ # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96
72
+ # NoHostAuthenticationForLocalhost no
73
+ # NumberOfPasswordPrompts 3
74
+ # PasswordAuthentication yes
75
+ # PermitLocalCommand no
76
+ # PKCS11Provider # (no default)
77
+ # Port 22
78
+ # PreferredAuthentications gssapi-with-mic,hostbased,publickey,keyboard-interactive,password # (set by ssh at run-time)
79
+ # Protocol 2
80
+ # ProxyCommand # (no default)
81
+ # PubkeyAuthentication yes
82
+ # RekeyLimit 0
83
+ # RemoteForward # (no default)
84
+ # RequestTTY auto
85
+ # RhostsRSAAuthentication no
86
+ # RSAAuthentication yes
87
+ # SendEnv # (no default)
88
+ # ServerAliveCountMax 3
89
+ # ServerAliveInterval 0
90
+ # StrictHostKeyChecking ask
91
+ # TCPKeepAlive yes
92
+ # Tunnel no
93
+ # TunnelDevice any:any
94
+ # UsePrivilegedPort no
95
+ # User # (set by command at run-time)
96
+ # UserKnownHostsFile ~/.ssh/known_hosts,~/.ssh/known_hosts2
97
+ # VerifyHostKeyDNS no
98
+ # VisualHostKey no
99
+ # XAuthLocationi xauth
@@ -1,4 +1,4 @@
1
1
  module Pipe2me
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  BANNER = "pipe2me command line client V#{Pipe2me::VERSION}; (c) The kinko team, 2013, 2014."
4
4
  end
@@ -0,0 +1,11 @@
1
+ module Which
2
+ def self.which!(cmd)
3
+ path = `which #{cmd}`.chomp
4
+ raise "Cannot find #{cmd} in your $PATH. Is it installed?" if path == ""
5
+ path
6
+ end
7
+
8
+ DAEMON = which!(:daemon)
9
+ AUTOSSH = which!(:autossh)
10
+ MONIT = which!(:monit)
11
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipe2me-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -66,17 +66,15 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: pipe2me command line client V0.2.9; (c) The kinko team, 2013, 2014.
69
+ description: pipe2me command line client V0.2.10; (c) The kinko team, 2013, 2014.
70
70
  email: contact@kinko.me
71
71
  executables:
72
72
  - pipe2me
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - README.md
77
76
  - bin/pipe2me
78
77
  - bin/pipe2med
79
- - lib/pipe2me.rb
80
78
  - lib/pipe2me/bin/natpmpc
81
79
  - lib/pipe2me/cli-foreman.rb
82
80
  - lib/pipe2me/cli-monit.rb
@@ -86,16 +84,20 @@ files:
86
84
  - lib/pipe2me/ext/http.rb
87
85
  - lib/pipe2me/ext/shell_format.rb
88
86
  - lib/pipe2me/ext/sys.rb
89
- - lib/pipe2me/tunnel.rb
90
87
  - lib/pipe2me/tunnel/commands.rb
91
88
  - lib/pipe2me/tunnel/echo/http
92
89
  - lib/pipe2me/tunnel/echo/https
93
90
  - lib/pipe2me/tunnel/openssl.conf
94
91
  - lib/pipe2me/tunnel/openssl.rb
95
92
  - lib/pipe2me/tunnel/ssh.rb
93
+ - lib/pipe2me/tunnel/ssh_config
94
+ - lib/pipe2me/tunnel.rb
96
95
  - lib/pipe2me/version.rb
96
+ - lib/pipe2me/which.rb
97
+ - lib/pipe2me.rb
97
98
  - rakelib/gem.rake
98
99
  - rakelib/test.rake
100
+ - README.md
99
101
  - test/000-roundup-test.sh
100
102
  - test/auth-token-test.sh
101
103
  - test/env-test.sh
@@ -129,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
131
  version: '0'
130
132
  requirements: []
131
133
  rubyforge_project:
132
- rubygems_version: 2.2.1
134
+ rubygems_version: 2.0.3
133
135
  signing_key:
134
136
  specification_version: 4
135
- summary: pipe2me command line client V0.2.9; (c) The kinko team, 2013, 2014.
137
+ summary: pipe2me command line client V0.2.10; (c) The kinko team, 2013, 2014.
136
138
  test_files: []