Sha256: 8e5dbdad568269fb79b70e83438682b536838a95ae7ac214e825f607c8cb916b

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

module VagrantPlugins
  module ReverseProxy
    class Plugin < Vagrant.plugin(2)
        name 'Reverse Proxy'

      description <<-DESC
        This plugin automatically manages a reverse proxy
        configuration in your host machine's web server, which makes
        it easy to access the web servers of your guest machines.

        This is safer and easier than making the guest machine
        completely available on the outside network.
      DESC

      config :reverse_proxy do
        require_relative 'config'
        Config
      end

      action_hook(:reverse_proxy, :machine_action_up) do |hook|
        hook.append(Action.add_machine)
      end

      action_hook(:reverse_proxy, :machine_action_suspend) do |hook|
        hook.append(Action.remove_machine)
      end

      action_hook(:reverse_proxy, :machine_action_resume) do |hook|
        hook.append(Action.add_machine)
      end

      action_hook(:reverse_proxy, :machine_action_halt) do |hook|
        hook.append(Action.remove_machine)
      end

      action_hook(:reverse_proxy, :machine_action_reload) do |hook|
        hook.append(Action.add_machine)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-reverse-proxy-0.5.0 lib/vagrant-reverse-proxy/plugin.rb
vagrant-reverse-proxy-0.4.0 lib/vagrant-reverse-proxy/plugin.rb