vagrant-share 0.0.1 → 2.0.0
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/lib/vagrant-share.rb +18 -0
- data/lib/vagrant-share/cap/tinycore.rb +89 -0
- data/lib/vagrant-share/command.rb +9 -0
- data/lib/vagrant-share/command/connect.rb +82 -0
- data/lib/vagrant-share/command/ngrok.rb +14 -0
- data/lib/vagrant-share/command/ngrok/connect.rb +236 -0
- data/lib/vagrant-share/command/ngrok/share.rb +500 -0
- data/lib/vagrant-share/command/share.rb +153 -0
- data/lib/vagrant-share/errors.rb +96 -0
- data/lib/vagrant-share/helper.rb +488 -0
- data/lib/vagrant-share/helper/api.rb +46 -0
- data/lib/vagrant-share/helper/word_list.rb +550 -0
- data/lib/vagrant-share/plugin.rb +49 -0
- data/lib/vagrant-share/version.rb +5 -0
- data/locales/en.yml +297 -0
- data/version.txt +1 -0
- metadata +58 -13
- data/vagrant-share.gemspec +0 -9
@@ -0,0 +1,49 @@
|
|
1
|
+
begin
|
2
|
+
require "vagrant"
|
3
|
+
rescue LoadError
|
4
|
+
raise "vagrant-share requires vagrant"
|
5
|
+
end
|
6
|
+
|
7
|
+
if Vagrant::VERSION < "1.5.0"
|
8
|
+
raise "Vagrant version must be at least 1.5.0."
|
9
|
+
end
|
10
|
+
|
11
|
+
module VagrantPlugins
|
12
|
+
module Share
|
13
|
+
class Plugin < Vagrant.plugin("2")
|
14
|
+
name "vagrant-share"
|
15
|
+
description <<-DESC
|
16
|
+
Provides the share command.
|
17
|
+
DESC
|
18
|
+
|
19
|
+
command("connect") do
|
20
|
+
require_relative "cap/tinycore"
|
21
|
+
init!
|
22
|
+
Command::Connect
|
23
|
+
end
|
24
|
+
|
25
|
+
command("share") do
|
26
|
+
require_relative "cap/tinycore"
|
27
|
+
init!
|
28
|
+
Command::Share
|
29
|
+
end
|
30
|
+
|
31
|
+
guest_capability("tinycore", "connect_proxy") do
|
32
|
+
require_relative "cap/tinycore"
|
33
|
+
Cap::TinyCore
|
34
|
+
end
|
35
|
+
|
36
|
+
guest_capability("tinycore", "share_proxy") do
|
37
|
+
require_relative "cap/tinycore"
|
38
|
+
Cap::TinyCore
|
39
|
+
end
|
40
|
+
|
41
|
+
protected
|
42
|
+
|
43
|
+
def self.init!
|
44
|
+
I18n.load_path << File.expand_path("locales/en.yml", Share.source_root)
|
45
|
+
I18n.reload!
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/locales/en.yml
ADDED
@@ -0,0 +1,297 @@
|
|
1
|
+
en:
|
2
|
+
vagrant_share:
|
3
|
+
deprecation:
|
4
|
+
share:
|
5
|
+
classic: |-
|
6
|
+
Vagrant Share using the `classic` driver is deprecated.
|
7
|
+
The `ngrok` driver is now the default driver and will
|
8
|
+
be supported into the future. For more information on
|
9
|
+
using the `ngrok` driver for Vagant Share, please refer
|
10
|
+
to the documentation:
|
11
|
+
|
12
|
+
https://www.vagrantup.com/docs/share/
|
13
|
+
ngrok: |-
|
14
|
+
Vagrant Share now defaults to using the `ngrok` driver.
|
15
|
+
The `classic` driver has been deprecated.
|
16
|
+
|
17
|
+
For more information about the `ngrok` driver, please
|
18
|
+
refer to the documentation:
|
19
|
+
|
20
|
+
https://www.vagrantup.com/docs/share/
|
21
|
+
connect:
|
22
|
+
classic: |-
|
23
|
+
Vagrant Connect using the `classic` driver is deprecated.
|
24
|
+
The `ngrok` driver is now the default driver and will be
|
25
|
+
supported into the future. For more information on using
|
26
|
+
the `ngrok` driver for Vagant Share, please refer to the
|
27
|
+
documentation:
|
28
|
+
|
29
|
+
https://www.vagrantup.com/docs/share/
|
30
|
+
ngrok: |-
|
31
|
+
Vagrant Connect now defaults to using the `ngrok` driver.
|
32
|
+
The `classic` driver has been deprecated.
|
33
|
+
|
34
|
+
For more information about the `ngrok` driver, please
|
35
|
+
refer to the documentation:
|
36
|
+
|
37
|
+
https://www.vagrantup.com/docs/share/
|
38
|
+
box_up_to_date: |-
|
39
|
+
Already up-to-date.
|
40
|
+
box_update: |-
|
41
|
+
An update was found! Will update box...
|
42
|
+
box_update_check: |-
|
43
|
+
Checking for proxy VM updates...
|
44
|
+
connect_info: |-
|
45
|
+
Vagrant has successfully connected to the remote shared machine!
|
46
|
+
You can either use the machine IP above to talk to it like any other
|
47
|
+
computer, or you can configure your software to use a standard
|
48
|
+
SOCKS5 proxy at the address above. With either method, you'll be able
|
49
|
+
to communicate with the shared machine.
|
50
|
+
|
51
|
+
If you're having trouble communicating, verify that the shared machine
|
52
|
+
has given you access to the specified ports.
|
53
|
+
|
54
|
+
Press Ctrl-C to stop connection.
|
55
|
+
connect_info_socks_only: |-
|
56
|
+
Vagrant has successfully connected to the remote shared machine!
|
57
|
+
Since you specified `--disable-static-ip`, you can only communicate
|
58
|
+
with this remote machine by using the SOCKS5 proxy specified above.
|
59
|
+
|
60
|
+
If you're having trouble communicating, verify that the shared machine
|
61
|
+
has given you access to the specified ports.
|
62
|
+
|
63
|
+
Press Ctrl-C to stop connection.
|
64
|
+
connect_ip: |-
|
65
|
+
Machine IP: %{ip}
|
66
|
+
connect_invalid_password: |-
|
67
|
+
Invalid password. Please try again.
|
68
|
+
connect_password_prompt: |-
|
69
|
+
Password for the private key:
|
70
|
+
connect_password_required: |-
|
71
|
+
The SSH key to connect to this share is encrypted. You will require
|
72
|
+
the password entered when creating to share to decrypt it. Verify you
|
73
|
+
access to this password before continuing.
|
74
|
+
|
75
|
+
Press enter to continue, or Ctrl-C to exit now.
|
76
|
+
connect_restricted_ports: |-
|
77
|
+
This share restricts the ports you can access! You can access the
|
78
|
+
ports listed below:
|
79
|
+
connect_socks_port: |-
|
80
|
+
SOCKS address: 127.0.0.1:%{port}
|
81
|
+
connect_ssh_available: |-
|
82
|
+
This share allows easy SSH access. Just run this command with
|
83
|
+
the `--ssh` flag to automatically SSH into the remote machine.
|
84
|
+
connecting: |-
|
85
|
+
Connecting to: %{name}
|
86
|
+
detecting: |-
|
87
|
+
Detecting network information for machine...
|
88
|
+
creating: |-
|
89
|
+
Creating Vagrant Share session...
|
90
|
+
creating_name: |-
|
91
|
+
Share will be at: %{name}
|
92
|
+
executing_ssh: |-
|
93
|
+
Executing SSH...
|
94
|
+
generating_ssh_key: |-
|
95
|
+
Generating new SSH key...
|
96
|
+
inserting_ssh_key: |-
|
97
|
+
Inserting generated SSH key into machine...
|
98
|
+
local_address_only: |-
|
99
|
+
Note: With the local address (127.0.0.1), Vagrant Share can only
|
100
|
+
share any ports you have forwarded. Assign an IP or address to your
|
101
|
+
machine to expose all TCP ports. Consult the documentation
|
102
|
+
for your provider ('%{provider}') for more information.
|
103
|
+
looking_up: |-
|
104
|
+
Loading share '%{name}'...
|
105
|
+
password_not_long_enough: |-
|
106
|
+
The supplied password is not long enough. OpenSSL requires a minimum of
|
107
|
+
four (4) characters for the password. Please use a longer password and
|
108
|
+
try again.
|
109
|
+
provider_unsupported: |-
|
110
|
+
The provider this machine is backed by ('%{provider}') doesn't
|
111
|
+
support telling Vagrant Share what address it is reachable at.
|
112
|
+
Vagrant Share will attempt to use 127.0.0.1 with forwarded ports
|
113
|
+
to find the address. Please contact the provider maintainer to fix
|
114
|
+
this error.
|
115
|
+
proxy_error: |-
|
116
|
+
Error: %{message}
|
117
|
+
ssh_flag_missing: |-
|
118
|
+
SSH options were specified on the command line without the
|
119
|
+
`--ssh` flag. You must specify this flag if you wish for these
|
120
|
+
other options to have any effect. Please add that flag or remove
|
121
|
+
the other options.
|
122
|
+
ssh_no_http: |-
|
123
|
+
An HTTP port couldn't be detected! Since SSH is enabled, this is
|
124
|
+
not an error. If you want to share both SSH and HTTP, please set
|
125
|
+
an HTTP port with `--http`.
|
126
|
+
ssh_password_confirm_prompt: |-
|
127
|
+
Repeat the password to confirm:
|
128
|
+
ssh_password_prompt: |-
|
129
|
+
Please enter a password to encrypt the key:
|
130
|
+
started: |-
|
131
|
+
Your Vagrant Share is running! Name: %{name}
|
132
|
+
started_connect: |-
|
133
|
+
Connect is running!
|
134
|
+
started_restricted: |-
|
135
|
+
You're sharing your Vagrant machine in "restricted" mode. This
|
136
|
+
means that only the ports listed above will be accessible by
|
137
|
+
other users (either via the web URL or using `vagrant connect --driver classic`).
|
138
|
+
started_ssh: |-
|
139
|
+
You're sharing with SSH access. This means that another user
|
140
|
+
simply has to run `vagrant connect --driver classic --ssh %{name}`
|
141
|
+
to SSH to your Vagrant machine.
|
142
|
+
started_ssh_encrypted: |-
|
143
|
+
Because you encrypted your SSH private key with a password,
|
144
|
+
the other user will be prompted for this password when they
|
145
|
+
run `vagrant connect --driver classic --ssh`. Please share this password with them
|
146
|
+
in some secure way.
|
147
|
+
starting_proxy_vm: |-
|
148
|
+
Starting a VM for a static connect IP. This will take a few moments.
|
149
|
+
verifying_login: |-
|
150
|
+
Checking authentication and authorization...
|
151
|
+
|
152
|
+
ngrok:
|
153
|
+
started_ssh: |-
|
154
|
+
You're sharing with SSH access. This means that another can SSH to
|
155
|
+
your Vagrant machine by running:
|
156
|
+
|
157
|
+
vagrant connect --ssh %{name}
|
158
|
+
started_full: |-
|
159
|
+
You're sharing full access to your Vagrant machine. This means that
|
160
|
+
another user can have access to your Vagrant machine by running:
|
161
|
+
|
162
|
+
vagrant connect %{name}
|
163
|
+
connection_lost: |-
|
164
|
+
Connection to the remote share '%{name}' has been lost!
|
165
|
+
errors:
|
166
|
+
api_error: |-
|
167
|
+
There was an error returned by the Vagrant Cloud server. The
|
168
|
+
error message is shown below:
|
169
|
+
|
170
|
+
%{message}
|
171
|
+
auth_expired: |-
|
172
|
+
You were logged in but your access token is no longer valid.
|
173
|
+
Please log in again using `vagrant login`.
|
174
|
+
auth_required: |-
|
175
|
+
You must logged in to Vagrant Cloud in order to use `vagrant share`.
|
176
|
+
Please log in with `vagrant login`.
|
177
|
+
connect_name_is_url: |-
|
178
|
+
The name of the share given to `vagrant connect` is a URL. Please
|
179
|
+
only pass in the name of the share. For example, if the URL of a share
|
180
|
+
is "hungry-lion-1234.vagrantshare.com", then you should invoke
|
181
|
+
the connect command with `vagrant connect hungry-lion-1234 --driver classic`.
|
182
|
+
detect_http_common_port_failed: |-
|
183
|
+
Vagrant was unable to detect an HTTP port for your machine.
|
184
|
+
|
185
|
+
Your Vagrant machine is reporting that it is accessible at
|
186
|
+
the address: '%{target}'.
|
187
|
+
|
188
|
+
Vagrant tries some common HTTP ports to try to find a listening
|
189
|
+
HTTP server, but all the attempts failed. There are a few options
|
190
|
+
to fix this error:
|
191
|
+
|
192
|
+
1. Turn off HTTP sharing with the `--disable-http` flag.
|
193
|
+
|
194
|
+
2. Have your HTTP server listen on port 80, 3000, 4567, 8000,
|
195
|
+
or 8080. Vagrant will automatically try these.
|
196
|
+
|
197
|
+
3. Specify an HTTP port explicitly to vagrant share with the
|
198
|
+
`--http` flag.
|
199
|
+
|
200
|
+
4. Make sure that the address above along with your HTTP port
|
201
|
+
are accessible from this machine. Sometimes firewalls or
|
202
|
+
binding to the wrong IP cause it to become inaccessible.
|
203
|
+
|
204
|
+
detect_http_forwarded_port_failed: |-
|
205
|
+
Vagrant was unable to detect an HTTP port for your machine.
|
206
|
+
|
207
|
+
Because your machine appears to have no static IP associated with
|
208
|
+
it, Vagrant scans through your forwarded ports, looking for one
|
209
|
+
that responds to an HTTP request. Vagrant couldn't find any
|
210
|
+
functioning HTTP port!
|
211
|
+
|
212
|
+
There are a few options to fix this error:
|
213
|
+
|
214
|
+
1. Create a forwarded port pointing to your HTTP server inside
|
215
|
+
your Vagrant machine.
|
216
|
+
|
217
|
+
2. Specify an HTTP port manually with `--http` to this command.
|
218
|
+
|
219
|
+
3. Assign a non-local address to your machine. This may or may
|
220
|
+
not be possible depending on what provider you're using.
|
221
|
+
|
222
|
+
4. Make sure that the HTTP server is up and running within
|
223
|
+
your machine. Vagrant share won't start until it is
|
224
|
+
reachable.
|
225
|
+
|
226
|
+
ip_could_not_auto_acquire: |-
|
227
|
+
Vagrant could not automatically find an IP that is available
|
228
|
+
for the connection! Please try again or manually specify an IP
|
229
|
+
with the `--static-ip` flag. If this error persists, please contact
|
230
|
+
support.
|
231
|
+
ip_in_use: |-
|
232
|
+
The requested IP '%{ip}' is already in use by some other machine.
|
233
|
+
Please choose another IP and try again.
|
234
|
+
ip_invalid: |-
|
235
|
+
The requested static IP '%{ip}' is not a valid IP address.
|
236
|
+
Please use a valid IP address (such as 172.16.0.12) and try again.
|
237
|
+
machine_not_ready: |-
|
238
|
+
The Vagrant environment you're attempting to share appears to
|
239
|
+
not be running. Please verify that it is running and try again.
|
240
|
+
ngrok_unavailable: |-
|
241
|
+
The executable 'ngrok' Vagrant is trying to run was not found
|
242
|
+
in the PATH variable. The 'ngrok' executable is required to
|
243
|
+
run Vagrant share. If 'ngrok' is currently installed in a
|
244
|
+
non-standard location, append that location to the PATH
|
245
|
+
variable and run this command again. If 'ngrok' is not
|
246
|
+
currently installed, it can be downloaded from the ngrok
|
247
|
+
website:
|
248
|
+
|
249
|
+
https://ngrok.com/download
|
250
|
+
proxy_exit: |-
|
251
|
+
The sharing proxy exited with a non-zero exit status! This represents
|
252
|
+
an erroneous exit and likely a bug. Please report this issue.
|
253
|
+
proxy_machine_bad_provider: |-
|
254
|
+
Your default provider '%{provider}' is not supported as a way to
|
255
|
+
start the VM that creates the static IP for vagrant connect.
|
256
|
+
For just this command, please set your default provider to
|
257
|
+
use either VirtualBox or VMware Fusion/Workstation.
|
258
|
+
server_not_set: |-
|
259
|
+
No Vagrant Cloud server has been set. This must be set for
|
260
|
+
Vagrant Share to work.
|
261
|
+
share_not_found: |-
|
262
|
+
The share '%{name}' could not be found!
|
263
|
+
|
264
|
+
Verify that the name you used is correct. If it is indeed correct,
|
265
|
+
make sure that you have permissions to view this share.
|
266
|
+
ssh_cant_insert_key: |-
|
267
|
+
Vagrant doesn't know how to insert new SSH keys into a machine
|
268
|
+
running the guest system: '%{guest}'. Please use a guest OS that
|
269
|
+
is supported or consider reporting a bug to help Vagrant support
|
270
|
+
this OS.
|
271
|
+
ssh_not_ready: |-
|
272
|
+
The machine is reporting that it is not ready for SSH access.
|
273
|
+
Vagrant can't share SSH access without the machine running and
|
274
|
+
ready to accept SSH connections. Please verify the machine is
|
275
|
+
running.
|
276
|
+
ssh_not_shared: |-
|
277
|
+
The share '%{name}' hasn't enabled SSH sharing!
|
278
|
+
Ask the person sharing their Vagrant environment to specify
|
279
|
+
the --ssh flag when running `vagrant share`.
|
280
|
+
|
281
|
+
Another possibility is that the share did previously allow sharing,
|
282
|
+
but the one-time use private key has been used already. Please ask
|
283
|
+
the person sharing their environment to reshare. If you intend on
|
284
|
+
using SSH multiple times, make sure the share side is not specifying
|
285
|
+
the `--ssh-once` flag.
|
286
|
+
ssh_host_port_not_detected: |-
|
287
|
+
A port forwarding mapping to the SSH port on the guest ('%{guest_port}')
|
288
|
+
could not be found. Because we're sharing 127.0.0.1, vagrant share
|
289
|
+
must have a forwarded port to access SSH.
|
290
|
+
|
291
|
+
To fix this problem, either create a forwarded port to the SSH port,
|
292
|
+
or change your configuration to allow vagrant share to share
|
293
|
+
a static address to the machine.
|
294
|
+
ssh_port_not_detected: |-
|
295
|
+
The SSH port for the machine could not be detected. This is
|
296
|
+
rare and should not happen. Please specify the SSH port manually
|
297
|
+
using the `--ssh-port` option.
|
data/version.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0
|
metadata
CHANGED
@@ -1,26 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-share
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
|
7
|
+
- Mitchell Hashimoto
|
8
|
+
- Vagrant Team
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
12
|
-
dependencies:
|
13
|
-
|
12
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rest-client
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 1.6.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 1.6.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: vagrant
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.9.2
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.9.2
|
42
|
+
description: Provides share functionality to Vagrant
|
14
43
|
email: vagrant@hashicorp.com
|
15
44
|
executables: []
|
16
45
|
extensions: []
|
17
46
|
extra_rdoc_files: []
|
18
47
|
files:
|
19
|
-
- vagrant-share.
|
20
|
-
|
21
|
-
|
48
|
+
- lib/vagrant-share.rb
|
49
|
+
- lib/vagrant-share/cap/tinycore.rb
|
50
|
+
- lib/vagrant-share/command.rb
|
51
|
+
- lib/vagrant-share/command/connect.rb
|
52
|
+
- lib/vagrant-share/command/ngrok.rb
|
53
|
+
- lib/vagrant-share/command/ngrok/connect.rb
|
54
|
+
- lib/vagrant-share/command/ngrok/share.rb
|
55
|
+
- lib/vagrant-share/command/share.rb
|
56
|
+
- lib/vagrant-share/errors.rb
|
57
|
+
- lib/vagrant-share/helper.rb
|
58
|
+
- lib/vagrant-share/helper/api.rb
|
59
|
+
- lib/vagrant-share/helper/word_list.rb
|
60
|
+
- lib/vagrant-share/plugin.rb
|
61
|
+
- lib/vagrant-share/version.rb
|
62
|
+
- locales/en.yml
|
63
|
+
- version.txt
|
64
|
+
homepage: http://www.vagrantup.com
|
65
|
+
licenses:
|
66
|
+
- MPL-2.0
|
22
67
|
metadata: {}
|
23
|
-
post_install_message:
|
68
|
+
post_install_message:
|
24
69
|
rdoc_options: []
|
25
70
|
require_paths:
|
26
71
|
- lib
|
@@ -35,8 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
80
|
- !ruby/object:Gem::Version
|
36
81
|
version: '0'
|
37
82
|
requirements: []
|
38
|
-
rubygems_version: 3.1.
|
39
|
-
signing_key:
|
83
|
+
rubygems_version: 3.1.6
|
84
|
+
signing_key:
|
40
85
|
specification_version: 4
|
41
|
-
summary: Vagrant
|
86
|
+
summary: Provides share functionality to Vagrant
|
42
87
|
test_files: []
|