core: exec with the proxy command if specified
This commit is contained in:
parent
5c64fa3d10
commit
4c35f6d071
|
@ -281,7 +281,7 @@ module Vagrant
|
|||
info[:forward_agent] = @config.ssh.forward_agent
|
||||
info[:forward_x11] = @config.ssh.forward_x11
|
||||
|
||||
# add in provided proxy command config
|
||||
# Add in provided proxy command config
|
||||
info[:proxy_command] = @config.ssh.proxy_command if @config.ssh.proxy_command
|
||||
|
||||
# Set the private key path. If a specific private key is given in
|
||||
|
|
|
@ -122,6 +122,10 @@ module Vagrant
|
|||
"-o", "ForwardX11Trusted=yes"]
|
||||
end
|
||||
|
||||
if ssh_info[:proxy_command]
|
||||
command_options += ["-o", "ProxyCommand=#{ssh_info[:proxy_command]}"]
|
||||
end
|
||||
|
||||
# Configurables -- extra_args should always be last due to the way the
|
||||
# ssh args parser works. e.g. if the user wants to use the -t option,
|
||||
# any shell command(s) she'd like to run on the remote server would
|
||||
|
|
|
@ -209,7 +209,10 @@ module VagrantPlugins
|
|||
:logger => ssh_logger,
|
||||
:verbose => :debug
|
||||
})
|
||||
connect_opts[:proxy] = Net::SSH::Proxy::Command.new(ssh_info[:proxy_command]) if ssh_info[:proxy_command]
|
||||
|
||||
if ssh_info[:proxy_command]
|
||||
connect_opts[:proxy] = Net::SSH::Proxy::Command.new(ssh_info[:proxy_command])
|
||||
end
|
||||
|
||||
@logger.info("Attempting to connect to SSH...")
|
||||
@logger.info(" - Host: #{ssh_info[:host]}")
|
||||
|
|
|
@ -21,6 +21,7 @@ module VagrantPlugins
|
|||
@forward_x11 = UNSET_VALUE
|
||||
@guest_port = UNSET_VALUE
|
||||
@keep_alive = UNSET_VALUE
|
||||
@proxy_command = UNSET_VALUE
|
||||
@shell = UNSET_VALUE
|
||||
|
||||
@default = SSHConnectConfig.new
|
||||
|
@ -40,6 +41,7 @@ module VagrantPlugins
|
|||
@forward_x11 = false if @forward_x11 == UNSET_VALUE
|
||||
@guest_port = nil if @guest_port == UNSET_VALUE
|
||||
@keep_alive = false if @keep_alive == UNSET_VALUE
|
||||
@proxy_command = nil if @proxy_command == UNSET_VALUE
|
||||
@shell = nil if @shell == UNSET_VALUE
|
||||
|
||||
@default.finalize!
|
||||
|
|
Loading…
Reference in New Issue