vagrant
https://github.com/mitchellh/vagrant
Ruby
Vagrant is a tool for building and distributing development environments.
VagrantPlugins::ProviderVirtualBox::Driver::Base#forward_ports
Forwards a set of ports for a VM.
This will not affect any previously set forwarded ports,
so be sure to delete those if you need to.
The format of each port hash should be the following:
{
name: "foo",
hostport: 8500,
guestport: 80,
adapter: 1,
protocol: "tcp"
}
Note that "adapter" and "protocol" are optional and will default
to 1 and "tcp" respectively.Edit
git clone [email protected]:mitchellh/vagrant.git
cd vagrant
open plugins/providers/virtualbox/driver/base.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-VagrantPlugins--ProviderVirtualBox--Driver--Base-forward_ports-for-pr
# Commit to gitgit add plugins/providers/virtualbox/driver/base.rbgit commit -m "better docs for VagrantPlugins::ProviderVirtualBox::Driver::Base#forward_ports"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-VagrantPlugins--ProviderVirtualBox--Driver--Base-forward_ports-for-pr
hub pull-request
# Celebrate!