All Projects → express42 → Vagrant Foodshow

express42 / Vagrant Foodshow

Licence: mit
Vagrant plugin for ngrok

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Vagrant Foodshow

Vagrant Parallels
Vagrant Parallels Provider
Stars: ✭ 893 (+1175.71%)
Mutual labels:  plugin, vagrant
Landrush
A Vagrant plugin that provides a simple DNS server for Vagrant guests
Stars: ✭ 665 (+850%)
Mutual labels:  plugin, vagrant
Divi Accessibility
Improve Divi accessibility in accordance with WCAG 2.0 guidelines.
Stars: ✭ 67 (-4.29%)
Mutual labels:  plugin
Streamdeck Homeassistant
🏠 Use the Elgato Stream Deck as Home Assistant controller. Call any available service and toggle lights or resume your music.
Stars: ✭ 69 (-1.43%)
Mutual labels:  plugin
Wordpress Plugin Installer
A PHP class for installing and activating WordPress plugins.
Stars: ✭ 69 (-1.43%)
Mutual labels:  plugin
Caddy Net
Proxy server type for Caddy server (https://github.com/mholt/caddy)
Stars: ✭ 68 (-2.86%)
Mutual labels:  plugin
Burpsuite Changeu
Stars: ✭ 69 (-1.43%)
Mutual labels:  plugin
Base
Base is the foundation for creating modular, unit testable and highly pluggable, server-side node.js applications.
Stars: ✭ 67 (-4.29%)
Mutual labels:  plugin
Sqlinator
Automatically forward HTTP GET & POST requests to SQLMap's API to test for SQLi and XSS
Stars: ✭ 70 (+0%)
Mutual labels:  plugin
Googleclientplugin
Google Client Plugin for Xamarin iOS and Android
Stars: ✭ 69 (-1.43%)
Mutual labels:  plugin
Godot Engine.file Editor
A Godot Engine addon that adds a File Editor for multiple file types editing. Create and Write plain text files, configuration files and csv files with custom visualizers and previews. Also supports file translations!
Stars: ✭ 70 (+0%)
Mutual labels:  plugin
Libfive Unity
A CSharp wrapper for libfive with Unity bindings
Stars: ✭ 69 (-1.43%)
Mutual labels:  plugin
Node Distance Addon
Native NodeJS add-on creation tutorial using C++
Stars: ✭ 68 (-2.86%)
Mutual labels:  plugin
Smqtk
Python toolkit for pluggable algorithms and data structures for multimedia-based machine learning.
Stars: ✭ 69 (-1.43%)
Mutual labels:  plugin
Annotationkit
The annotation implementation using Objective-C
Stars: ✭ 68 (-2.86%)
Mutual labels:  plugin
My Custom Functionality
A basic starter plugin to load assets like CSS and JS files in WordPress.
Stars: ✭ 70 (+0%)
Mutual labels:  plugin
Cart Magento
Mercado Pago's Official Magento 1 Plugin
Stars: ✭ 67 (-4.29%)
Mutual labels:  plugin
Scorehud
An event driven, highly customizable plugin to add Scoreboards on your Minecraft Bedrock Server.
Stars: ✭ 69 (-1.43%)
Mutual labels:  plugin
Caddy V1 Service
⬛️ Run Caddy as a service
Stars: ✭ 69 (-1.43%)
Mutual labels:  plugin
Rubel
Rubel is a cms built with Laravel and React.
Stars: ✭ 70 (+0%)
Mutual labels:  vagrant

Foodshow: Share your Vagrant virtual machine

Code Climate express42/vagrant-foodshow API Documentation

Vagrant-Foodshow plugin allows you to share tcp ports of your virtual machine via the Internet.

With this plugin you may show your web application to your colleague, present new feature for your customer and give ssh access to your ops guy.

All tunneling job performed by Ngrok backend. Ngrok tunnel can operate in TCP and HTTP modes. In HTTP tunnel mode ngrok provides access to HTTP requests and response from server to help you analyze the traffic. In TCP mode you can tunnel any binary protocol like ssh, postgresql or whatever you want, but there is no introspection in TCP tunnel.

Vagrant-foodshow and vagrant-share

Vagrant-foodshow unlike vagrnat-share an opensource product. Ngrok client and server part is also opensource. Ngrok server and server-side part of vagrant-share both available as SAAS solutions, but you can setup your own ngrok server for free. This is a good solution if you don't want send tunneled traffic through third-party servers.

Installation

Ngrok installation

You should go to ngrok.com and download ngrok binary for your system. Vagrant-foodshow will search ngrok binary in PATH. ~/bin/ngrok will be used if no ngrok binary in PATH. To disable search you may set foodshow.ngrok_bin option (See Advanced tunnel example).

Plugin installation

To install this plugin just execute:

vagrant plugin install vagrant-foodshow

Usage&Configuration

First of all you should enable plugin in your Vagrantfile:

config.foodshow.enabled = true

There are two ways to create a tunnel

Call method foodshow.tunnel :
...
config.foodshow.tunnel <host_port>, <protocol>, [options hash]
...
Add ngrok_proto parameter to vm.network :
...
config.vm.network :forwarded_port, guest: <guest_port>, host: <host_port>, ngrok_proto: "<protocol>"
...

Default tunnel protocol is http+https. Ngrok supports http, https, http+https and tcp. For tcp protocol authtoken is required.

Simple tunnel example

Vagrant.configure("2") do |config|
  #Enable foodshow
  config.foodshow.enabled = true
  ...
  # Define vm
  config.vm.define :web01 do |conf|
    ...
    #Just add ngrok_proto parameter to your port forwarding entry
    conf.vm.network :forwarded_port, guest: 80, host: 8080, ngrok_proto: "http+https"
    ...
    end
end

Advanced tunnel example

Vagrant.configure("2") do |config|
  #Enable foodshow
  config.foodshow.enabled = true
  # Change ngrok binary location
  config.foodshow.ngrok_bin = "/usr/local/bin/ngrok"
  # Automaticly search ssh port and create tcp tunnel
  config.foodshow.forward_ssh = true
  ...
  # Define vms
  config.vm.define :web01 do |conf|
    ...
    conf.vm.network :forwarded_port, guest: 80, host: 8080, ngrok_proto: "http+https"
    # Don't tunnel ssh for this vm
    config.foodshow.forward_ssh = false
    # For this vm we use another token
    conf.foodshow.authtoken = <sometoken_2>
    ...
  end
  config.vm.define :web02 do |conf|
    ...
    conf.vm.network :forwarded_port, guest: 80, host: 8081
    conf.vm.network :forwarded_port, guest: 389, host: 3389
    # You may pass some params as tunnel options
    # This code creates a tunnel http://mycopmanyllc.ngrok.com with basic auth
    conf.foodshow.tunnel 8081, "http", :httpauth => "foodshow:ngrok" :subdomain => "mycopmanyllc"
    # And sure you may tunnel any tcp port
    conf.foodshow.tunnel 3389, "tcp"
    ...
  end
end

Self-hosted tunnel example

Vagrant.configure("2") do |config|
  #Enable foodshow
  config.foodshow.enabled = true
  # Set your ngrokd server
  config.foodshow.server_addr = "127.0.0.1:4443"
  # Allow host root certificate
  config.foodshow.trust_host_root_certs = true
  ...
  # Define vm
  config.vm.define :web01 do |conf|
    ...
    #Just add ngrok_proto parameter to your port forwarding entry
    conf.vm.network :forwarded_port, guest: 80, host: 8080, ngrok_proto: "http+https"
    ...
    end
end

Read this document if you want to start self-hosted server https://github.com/inconshreveable/ngrok/blob/master/docs/SELFHOSTING.md

Options

  • Scope config means that this option can be set only via foodshow.<options>
  • Scope config+tunnel means that this option can be set via foodshow.<options> and can be can be passed to the foodshow.tunnel method as options hash.
  • Scope tunnel means that this option can be passed to the foodshow.tunnel method

Configuration options for ngrok v1.x

Option Default Scope Purpose
enabled false config Enable foodshow plugin
ngrok_bin nil config+tunnel By default vagrant-foodshow will search ngrok binary in PATH, then at ~/bin/ngrok. You may override this behavior by setting this option
forward_ssh false config Automatically search and forward vagrant ssh guest port (authtoken required)
timeout 10 config Max waiting time for establishing tunnel
authtoken nil config+tunnel Auth token. Required for TCP tunnels and some functions (Go to ngrok.com to get authkey)
httpauth nil config+tunnel You may set basic auth for http/https tunnel. Format: user:password
subdomain nil config+tunnel Custom subdomain for http/https tunnel. URL will be like a http://<subdomain>.ngrok.com
hostname nil config+tunnel Custom domain for http/https tunnel (Paid feature, see Pricing & Features on ngrok website )
host_ip 127.0.0.1 tunnel Custom destination ip for tunnel
inspect_addr 127.0.0.1 config Address for traffic inspection
inspect_pbase 4040 config Base port for traffic inspection, other ngrok processes will use the next available port
server_addr nil config+tunnel Server address for self-hosted ngrokd, see Self-hosted tunnels example
trust_host_root_certs nil config+tunnel Allow ngrok accept root server certificate. Must be true if you using self-hosted ngrokd

Changes in config options for ngrok v2.x

v1.x option v2.x option
httpauth => auth
inspect_addr => web_addr
inspect_pbase => web_pbase

If you are using ngrok v2.x authtoken option could be automatically filled from ngrok configuration

Authors

Contributing

  1. Fork it ( http://github.com/express42/vagrant-foodshow/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].