orassh 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bc22c36b596e037cff99cc85054cf9cb8694793d3b563c20f91cbdbbb8e29bd4
4
+ data.tar.gz: 4c2a36477e77ebf44dc50e34cde67b1deb9d50da9f78fef2d7220e22f3ea3f1d
5
+ SHA512:
6
+ metadata.gz: 9b88511c213548620a1a11aef6bdd56db5c7fd711307ca52caa83a2a95e03309095b9d1665cd8ffcae56353e713cea202c4dc479882d96e3936fce3721447854
7
+ data.tar.gz: dcca781e04701937e1e00b7b5694f1318b8b07d49fd451f76968d48acb16d67d629108e34391990eebea781118180f06e29605afccd9850c4a7a59c2cd951532
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at UlyssesZhan@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in orassh.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
data/Gemfile.lock ADDED
@@ -0,0 +1,25 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ orassh (0.1.0)
5
+ gist (>= 6.0.0)
6
+ highline (>= 2.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ gist (6.0.0)
12
+ highline (2.0.3)
13
+ minitest (5.15.0)
14
+ rake (13.0.6)
15
+
16
+ PLATFORMS
17
+ x86_64-linux
18
+
19
+ DEPENDENCIES
20
+ minitest (~> 5.0)
21
+ orassh!
22
+ rake (~> 13.0)
23
+
24
+ BUNDLED WITH
25
+ 2.3.7
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Ulysses Zhan
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/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # Orassh
2
+
3
+ A free ngrok account can help you connect to your remote computer over the internet,
4
+ but the URL and port differ each time.
5
+ This tool helps you to automate the task:
6
+
7
+ - On server: run ngrok, and upload the URL and port to a GitHub Gist file;
8
+ - On client: read the URL and port from the GitHub Gist file, and do the previously configured task.
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'orassh'
16
+ ```
17
+
18
+ And then execute:
19
+
20
+ $ bundle install
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install orassh
25
+
26
+ ## Usage
27
+
28
+ TODO: Write usage instructions here
29
+
30
+ ## Development
31
+
32
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
+
34
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
35
+
36
+ ## Contributing
37
+
38
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/orassh. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/orassh/blob/master/CODE_OF_CONDUCT.md).
39
+
40
+ ## License
41
+
42
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
43
+
44
+ ## Code of Conduct
45
+
46
+ Everyone interacting in the Orassh project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/orassh/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ task default: :test
data/exe/orassh ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ require 'highline/import'
5
+ require 'orassh'
6
+
7
+ type = :client
8
+ config_path = File.expand_path '~/.config/orassh.yml'
9
+ OptionParser.new do |parser|
10
+ parser.banner = 'Usage: orassh [tunnels] [options]'
11
+ parser.on '-h', '--help', 'Prints this help' do |o|
12
+ puts parser
13
+ exit
14
+ end
15
+ parser.on '-s', '--server', 'Server mode' do |o|
16
+ type = :server
17
+ end
18
+ parser.on '-c', '--client', 'Client mode' do |o|
19
+ type = :client
20
+ end
21
+ parser.on '-C', '--config FILEPATH', 'Config file' do |o|
22
+ config_path = o
23
+ end
24
+ parser.on '-v', '--version', 'Prints version' do |o|
25
+ puts Orassh::VERSION
26
+ exit
27
+ end
28
+ end.parse!
29
+
30
+ unless File.exist? config_path
31
+ if HighLine.agree "Config file '#{config_path}' does not exist. Create one and edit it? [y/n]"
32
+ File.write config_path, Orassh::DEFAULT_CONFIG
33
+ system ENV['EDITOR'] || 'nano', config_path
34
+ end
35
+ end
36
+
37
+ if type == :server
38
+ Orassh::Server.run config_path, ARGV.to_a
39
+ else
40
+ Orassh::Client.run config_path, ARGV.to_a
41
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orassh
4
+ VERSION = "0.1.0"
5
+ end
data/lib/orassh.rb ADDED
@@ -0,0 +1,246 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yaml'
4
+ require 'json'
5
+ require 'open3'
6
+ require 'net/http'
7
+ require 'gist'
8
+ require_relative "orassh/version"
9
+
10
+ def Gist.get_gist_content id, file_name = nil
11
+ url = "#{base_path}/gists/#{id}"
12
+
13
+ access_token = auth_token()
14
+
15
+ request = Net::HTTP::Get.new(url)
16
+ request['Authorization'] = "token #{access_token}" if access_token.to_s != ''
17
+ response = http(api_url, request)
18
+
19
+ if response.code == '200'
20
+ body = JSON.parse(response.body)
21
+ files = body["files"]
22
+
23
+ if file_name
24
+ file = files[file_name]
25
+ raise Error, "Gist with id of #{id} and file #{file_name} does not exist." unless file
26
+ else
27
+ file = files.values.first
28
+ end
29
+
30
+ file["content"]
31
+ else
32
+ raise Error, "Gist with id of #{id} does not exist."
33
+ end
34
+ end
35
+
36
+ class Orassh::NgrokNotFoundError < StandardError
37
+ end
38
+
39
+ class Orassh::NgrokBadConfigError < StandardError
40
+ end
41
+
42
+ class Orassh::ConfigNotFoundError < StandardError
43
+ end
44
+
45
+ class Orassh::MissingConfigItemError < StandardError
46
+ end
47
+
48
+ class Orassh::ConfigSyntaxError < StandardError
49
+ end
50
+
51
+ class Orassh::UnknownTunnelError < StandardError
52
+ end
53
+
54
+ class Orassh::GitHubTokenNotFoundError < Orassh::MissingConfigItemError
55
+ end
56
+
57
+ class Orassh::TunnelsNotSpecifiedError < Orassh::MissingConfigItemError
58
+ end
59
+
60
+ class Orassh::MissingGistIdError < Orassh::MissingConfigItemError
61
+ end
62
+
63
+ class Orassh::TunnelNotAvailable < StandardError
64
+ end
65
+
66
+ class Orassh::CommandNotSpecified < Orassh::MissingConfigItemError
67
+ end
68
+
69
+ Orassh::DEFAULT_NGROK_CONFIG = case
70
+ when /cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM
71
+ File.expand_path '~/AppData/Local/ngrok/ngrok.yml'
72
+ when /darwin/ =~ RUBY_PLATFORM
73
+ File.expand_path '~/Library/Application Support/ngrok/ngrok.yml'
74
+ else
75
+ File.expand_path '~/.config/ngrok/ngrok.yml'
76
+ end
77
+
78
+ Orassh::DEFAULT_CONFIG = <<YAML
79
+ gist_id: YOUR_GIST_ID
80
+ gist_filename: YOUR_FILENAME.json
81
+ server:
82
+ github_token: YOUR_GITHUB_TOKEN
83
+ ngrok_command: ngrok
84
+ ngrok_webhook_url: http://localhost:4040
85
+ ngrok_config:
86
+ - "#{Orassh::DEFAULT_NGROK_CONFIG}"
87
+ client:
88
+ tunnels:
89
+ ssh:
90
+ command: ssh -p {PORT} {DOMAIN}
91
+ jupyter-notebook:
92
+ command: xdg-open {URL}
93
+ YAML
94
+
95
+ class << Orassh
96
+
97
+ attr_reader :config, :gist_id, :gist_filename
98
+
99
+ def load_config path
100
+ begin
101
+ @config = YAML.load_file path
102
+ rescue Errno::ENOENT
103
+ raise Orassh::ConfigNotFoundError, "Config file is not found at #{path}"
104
+ rescue JSON::ParserError => e
105
+ raise Orassh::ConfigSyntaxError, e.message
106
+ end
107
+ unless @gist_id = @config['gist_id']
108
+ raise Orassh::MissingGistIdError, '`gist_id` is not specified in config'
109
+ end
110
+ @gist_filename = @config['gist_filename'] || 'orassh.json'
111
+ end
112
+ end
113
+
114
+ class << Orassh::Server = Module.new
115
+
116
+ attr_accessor :ngrok_command, :ngrok_config, :github_token, :ngrok_tunnels, :tunnels
117
+ attr_reader :ngrok_pid, :ngrok_webhook_url, :api_tunnels_list, :processed_tunnels
118
+
119
+ def load_config path
120
+ Orassh.load_config path
121
+ @ngrok_command = Orassh.config['server']['ngrok_command'] || 'ngrok'
122
+ @ngrok_config = Orassh.config['server']['ngrok_config'] || [Orassh::DEFAULT_NGROK_CONFIG]
123
+ unless @github_token = Orassh.config['server']['github_token']
124
+ raise Orassh::GitHubTokenNotFoundError, 'GitHub token is not specified'
125
+ end
126
+ @ngrok_webhook_url = Orassh.config['server']['ngrok_webhook_url'] || 'http://localhost:4040'
127
+ check_ngrok
128
+ load_ngrok_config
129
+ check_tunnels
130
+ end
131
+
132
+ def check_ngrok
133
+ case system @ngrok_command, 'config', 'check', '--config', *@ngrok_config
134
+ when nil
135
+ raise Orassh::NgrokNotFoundError, 'Failed to execute `ngrok` command'
136
+ when false
137
+ raise Orassh::NgrokBadConfigError, 'Bad ngrok config file; run `ngrok config check` to see details'
138
+ end
139
+ end
140
+
141
+ def load_ngrok_config
142
+ @ngrok_tunnels = {}
143
+ @ngrok_config.each do |path|
144
+ tunnels = YAML.load_file(path)['tunnels']
145
+ @ngrok_tunnels.merge! tunnels if tunnels
146
+ end
147
+ end
148
+
149
+ def check_tunnels
150
+ if !@tunnels || @tunnels.empty?
151
+ raise Orassh::TunnelsNotSpecifiedError, 'Tunnels are not specified'
152
+ end
153
+ @tunnels.each do |name|
154
+ unless @ngrok_tunnels.has_key? name
155
+ raise Orassh::UnknownTunnelError, "Unknown tunnel #{name}"
156
+ end
157
+ end
158
+ end
159
+
160
+ def start_tunnels
161
+ @ngrok_pid = spawn @ngrok_command, 'start', *@tunnels, '--config', *@ngrok_config, out: File::NULL
162
+ begin
163
+ @api_tunnels_list = JSON.parse(Net::HTTP.get URI "#@ngrok_webhook_url/api/tunnels")['tunnels']
164
+ rescue Errno::ECONNREFUSED
165
+ next
166
+ end until @api_tunnels_list&.size == @tunnels.size
167
+ @processed_tunnels = @api_tunnels_list.each_with_object({}) do |tunnel_data, hash|
168
+ match_data = /(?<proto>[a-z]+):\/\/(?<domain>(\w+[\-.])+\w+)(:(?<port>\d+))?/.match tunnel_data['public_url']
169
+ hash[tunnel_data['name']] = {
170
+ 'id' => tunnel_data['ID'],
171
+ 'proto' => match_data[:proto],
172
+ 'domain' => match_data[:domain],
173
+ 'port' => match_data[:port],
174
+ 'addr' => tunnel_data['config']['addr'],
175
+ 'url' => tunnel_data['public_url']
176
+ }
177
+ end
178
+ end
179
+
180
+ def send_tunnel_data
181
+ Gist.gist JSON.generate(@processed_tunnels),
182
+ access_token: @github_token, update: Orassh.gist_id, filename: Orassh.gist_filename
183
+ end
184
+
185
+ def run config_path, tunnels
186
+ @tunnels = tunnels
187
+ load_config config_path
188
+ start_tunnels
189
+ begin
190
+ send_tunnel_data
191
+ rescue Gist::Error => e
192
+ Process.kill 'INT', @ngrok_pid
193
+ raise e
194
+ end
195
+ puts @processed_tunnels.to_yaml
196
+ begin
197
+ Process.wait @ngrok_pid
198
+ rescue Interrupt
199
+ Process.kill 'INT', @ngrok_pid
200
+ end
201
+ end
202
+ end
203
+
204
+ class << Orassh::Client = Module.new
205
+ attr_accessor :configured_tunnels, :processed_tunnels
206
+
207
+ def load_config config_path
208
+ Orassh.load_config config_path
209
+ @configured_tunnels = Orassh.config['client']['tunnels'] || {}
210
+ end
211
+
212
+ def receive_tunnel_data
213
+ @processed_tunnels = JSON.parse Gist.get_gist_content Orassh.gist_id, Orassh.gist_filename
214
+ end
215
+
216
+ def run_task tunnel
217
+ unless configured_tunnel = @configured_tunnels[tunnel]
218
+ raise Orassh::UnknownTunnelError, "Unknown tunnel '#{tunnel}'"
219
+ end
220
+ unless processed_tunnel = @processed_tunnels[tunnel]
221
+ raise Orassh::TunnelNotAvailable, "Information about tunnel '#{tunnel}' cannot be found on Gist"
222
+ end
223
+ unless command = configured_tunnel['command']
224
+ raise Orassh::CommandNotSpecified, "Command is not specified for tunnel '#{tunnel}'"
225
+ end
226
+ command.gsub! '{NAME}', tunnel
227
+ command.gsub! '{ID}', processed_tunnel['id']
228
+ command.gsub! '{PROTO}', processed_tunnel['proto']
229
+ command.gsub! '{DOMAIN}', processed_tunnel['domain']
230
+ command.gsub! '{PORT}', processed_tunnel['port']
231
+ command.gsub! '{ADDR}', processed_tunnel['addr']
232
+ command.gsub! '{URL}', processed_tunnel['url']
233
+ command.gsub! '\}', '}'
234
+ system command
235
+ end
236
+
237
+ def run config_path, tunnels
238
+ load_config config_path
239
+ begin
240
+ receive_tunnel_data
241
+ rescue JSON::ParserError, Gist::Error => e
242
+ raise e
243
+ end
244
+ tunnels.each { run_task _1 }
245
+ end
246
+ end
data/orassh.gemspec ADDED
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/orassh/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "orassh"
7
+ spec.version = Orassh::VERSION
8
+ spec.authors = ["Ulysses Zhan"]
9
+ spec.email = ["UlyssesZhan@gmail.com"]
10
+
11
+ spec.summary = "Uses GitHub Gist and ngrok to help you connect to your remote computer with SSH."
12
+ spec.description = "A free ngrok account can help you connect to your remote computer over the internet, " +
13
+ "but the URL and port differ each time. " +
14
+ "This tool helps you to automate the task:\n" +
15
+ "- On server: run ngrok, and upload the URL and port to a GitHub Gist file;\n" +
16
+ "- On client: read the URL and port from the GitHub Gist file, and do the previously configured task."
17
+ spec.homepage = "https://github.com/UlyssesZh/orassh"
18
+ spec.license = "MIT"
19
+ spec.required_ruby_version = ">= 3.0.0"
20
+
21
+ spec.metadata["homepage_uri"] = spec.homepage
22
+ spec.metadata["source_code_uri"] = "https://github.com/UlyssesZh/orassh"
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
27
+ `git ls-files -z`.split("\x0").reject do |f|
28
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
29
+ end
30
+ end
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+
35
+ spec.add_dependency "gist", ">= 6.0.0"
36
+ spec.add_dependency "highline", ">= 2.0.0"
37
+
38
+ # For more information and examples about making a new gem, check out our
39
+ # guide at: https://bundler.io/guides/creating_gem.html
40
+ end
data/sig/orassh.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Orassh
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: orassh
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ulysses Zhan
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-08-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: gist
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 6.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 6.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: highline
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.0.0
41
+ description: |-
42
+ A free ngrok account can help you connect to your remote computer over the internet, but the URL and port differ each time. This tool helps you to automate the task:
43
+ - On server: run ngrok, and upload the URL and port to a GitHub Gist file;
44
+ - On client: read the URL and port from the GitHub Gist file, and do the previously configured task.
45
+ email:
46
+ - UlyssesZhan@gmail.com
47
+ executables:
48
+ - orassh
49
+ extensions: []
50
+ extra_rdoc_files: []
51
+ files:
52
+ - CODE_OF_CONDUCT.md
53
+ - Gemfile
54
+ - Gemfile.lock
55
+ - LICENSE.txt
56
+ - README.md
57
+ - Rakefile
58
+ - exe/orassh
59
+ - lib/orassh.rb
60
+ - lib/orassh/version.rb
61
+ - orassh.gemspec
62
+ - sig/orassh.rbs
63
+ homepage: https://github.com/UlyssesZh/orassh
64
+ licenses:
65
+ - MIT
66
+ metadata:
67
+ homepage_uri: https://github.com/UlyssesZh/orassh
68
+ source_code_uri: https://github.com/UlyssesZh/orassh
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: 3.0.0
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubygems_version: 3.3.7
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: Uses GitHub Gist and ngrok to help you connect to your remote computer with
88
+ SSH.
89
+ test_files: []