{"id":15645194,"url":"https://github.com/gsamokovarov/rvt","last_synced_at":"2025-04-14T16:17:18.255Z","repository":{"id":25437618,"uuid":"28867384","full_name":"gsamokovarov/rvt","owner":"gsamokovarov","description":"Remote Terminal for the Browser.","archived":false,"fork":false,"pushed_at":"2019-09-26T08:11:29.000Z","size":215,"stargazers_count":57,"open_issues_count":3,"forks_count":21,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T16:17:07.733Z","etag":null,"topics":["remote-shell","ruby-on-rails","ssh"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gsamokovarov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-06T14:39:25.000Z","updated_at":"2025-04-12T01:13:44.000Z","dependencies_parsed_at":"2022-09-25T02:30:22.162Z","dependency_job_id":null,"html_url":"https://github.com/gsamokovarov/rvt","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsamokovarov%2Frvt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsamokovarov%2Frvt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsamokovarov%2Frvt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsamokovarov%2Frvt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsamokovarov","download_url":"https://codeload.github.com/gsamokovarov/rvt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248914117,"owners_count":21182359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["remote-shell","ruby-on-rails","ssh"],"created_at":"2024-10-03T12:05:02.968Z","updated_at":"2025-04-14T16:17:18.236Z","avatar_url":"https://github.com/gsamokovarov.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](https://raw.github.com/gsamokovarov/rvt/master/.logo.png)\n\nA [VT100] compatible terminal, running on Rails.\n\n## Requirements\n\n_RVT_ has been tested on the following rubies.\n\n* _MRI Ruby_ 2.2\n* _MRI Ruby_ 2.1\n* _MRI Ruby_ 2.0\n* _MRI Ruby_ 1.9.3\n\n_Rubunius_ in 1.9 mode may work, but it hasn't been tested.\n\n_RVT_ has been built explicitly for _Rails 4_.\n\n## Installation\n\nTo install it in your current application, add the following to your `Gemfile`.\n\n```ruby\ngroup :development do\n  gem 'rvt'\nend\n```\n\nAfter you save the `Gemfile` changes, make sure to run `bundle install` and\nrestart your server for the _RVT_ to take affect.\n\nBy default, it should be available in your development environment under\n`/console`. The route is not automatically mounted in a production environment\nand we strongly encourage you to keep it that way.\n\n## Configuration\n\n\u003e Today we have learned in the agony of war that great power involves great\n\u003e responsibility.\n\u003e\n\u003e -- \u003ccite\u003eFranklin D. Roosevelt\u003c/cite\u003e\n\n_RVT_ is a powerful tool. It allows you to execute arbitrary code on\nthe server, so you should be very careful, who you give access to it.\n\n### config.rvt.whitelisted_ips\n\nBy default, only requests coming from `127.0.0.1` are allowed.\n\n`config.rvt.whitelisted_ips` lets you control which IP's have access to\nthe console.\n\nLet's say you want to share your console with just that one roommate, you like\nand his/her IP is `192.168.0.100`.\n\n```ruby\nclass Application \u003c Rails::Application\n  config.rvt.whitelisted_ips = %w( 127.0.0.1 192.168.0.100 )\nend\n```\n\nFrom the example, you can guess that `config.rvt.whitelisted_ips`\naccepts an array of ip addresses, provided as strings. An important thing to\nnote here is that, we won't push `127.0.0.1` if you manually set the option!\n\nNow let's assume you like all of your roommates. Instead of enumerating their\nIP's, you can whitelist the whole private network. Now every time their IP's\nchange, you'll have them covered.\n\n```ruby\nclass Application \u003c Rails::Application\n  config.rvt.whitelisted_ips = '192.168.0.0/16'\nend\n```\n\nYou can see that `config.rvt.whitelisted_ips` accepts plains strings\ntoo. More than that, they can cover whole networks.\n\nAgain, note that this network doesn't allow `127.0.0.1`. If you want to access\nthe console, you have to do so from it's external IP or add `127.0.0.1` to the\nmix.\n\n### config.rvt.default_mount_path\n\nBy default, the console will be automatically mounted on `/console`.\n\n_(This happens only in the development and test environments!)_.\n\nSay you want to mount the console to `/debug`, so you can more easily remember\nwhere to go, when your application needs debugging.\n\n```ruby\nclass Application \u003c Rails::Application\n  config.rvt.default_mount_path = '/debug'\nend\n```\n\n### config.rvt.automount\n\nIf you want to explicitly mount `RVT::Engine`, you can prevent the\nautomatic mount by setting this option to `false`.\n\n### config.rvt.command\n\nBy default, _RVT_ will run `Rails.root.join('bin/rails console)` to\nspawn you a fresh Rails console. If the relative `bin/rails` does not exist, it\ndoesn't exist, `rails console` will be run.\n\nOne of the advantages of being a [VT100] emulator is that _RVT_ can run\nmost of your terminal applications.\n\nLet say _(for some reason)_ you can't run SSH on your server machine. You can\nrun [`login`][login] instead to let users sign into the host system.\n\n```ruby\nclass Application \u003c Rails::Application\n  # You have to run /bin/login as root. That should worry you and you may work\n  # around it by running ssh connecting to the same machine.\n  config.rvt.command = 'sudo /bin/login'\nend\n```\n\n_Poor man's solution to SSH._ ![boom](http://f.cl.ly/items/3n2h0p1w0B261u2d201b/boom.png)\n\n**If you ever decide to use _RVT_ that way, use SSL to encrypt the\ntraffic, otherwise all the input (including the negotiated username and\npassword) can be easily sniffed!**\n\n### config.rvt.term\n\nBy default, the _RVT_ terminal will report itself as `xterm-color`. You\ncan override this option to change that.\n\n### config.rvt.timeout\n\nYou may have noticed that _RVT_ client sends a lot of requests to the\nserver. And by a lot, we really mean, **a lot** _(every few milliseconds)_.\nWe do this since we can't reliably predict when the output of your command\nexecution will come available, so we poll for it.\n\nThis option control how much will the server wait on the process output pipe\nfor input, before signalling the client to try again.\n\nMaybe some day Web Sockets or SSE can be used for more efficient communication.\nUntil that day, you can use long-polling. To enable it, use [Puma] as your\ndevelopment server and add the following to your configuration.\n\n```ruby\nclass Application \u003c Rails::Application\n  # You have to explicitly enable the concurrency, as in development mode,\n  # the falsy config.cache_classes implies no concurrency support.\n  #\n  # The concurrency is enabled by removing the Rack::Lock middleware, which\n  # wraps each request in a mutex, effectively making the request handling\n  # synchronous.\n  config.allow_concurrency = true\n\n  # For long-polling, 45 seconds timeout for the development server seems\n  # reasonable. You may want to experiment with the value.\n  config.rvt.timeout = 45.seconds\nend\n```\n\n## Styling\n\nIf you would like to style the terminal a bit different than the default\nappearance, you can do so with the following options.\n\n### config.rvt.style.font\n\nYou may also change the font, which is following the CSS font property syntax.\nBy default it is `large DejaVu Sans Mono, Liberation Mono, monospace`.\n\n## FAQ\n\n### I'm running JRuby and the console doesn't load.\n\n**TL;DR** Give it a bit of time, it will load.\n\nWhile spawning processes is relatively cheap on _MRI_, this is not the case in\n_JRuby_. Spawning another process is slow. Spawning another **JRuby** process\nis even slower. Read more about the problem at the _JRuby_ [wiki].\n\n  [Puma]: http://puma.io/\n  [VT100]: http://en.wikipedia.org/wiki/VT100\n  [login]: http://linux.die.net/man/1/login\n  [video]: http://www.youtube.com/watch?v=zjuJRXCLkHk\n  [wiki]: https://github.com/jruby/jruby/wiki/Improving-startup-time#avoid-spawning-sub-rubies\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsamokovarov%2Frvt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsamokovarov%2Frvt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsamokovarov%2Frvt/lists"}