summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/configuration.rb5
-rw-r--r--lib/puppet/network/xmlrpc/client.rb11
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/puppet/configuration.rb b/lib/puppet/configuration.rb
index 2828559b8..d44035dda 100644
--- a/lib/puppet/configuration.rb
+++ b/lib/puppet/configuration.rb
@@ -339,6 +339,11 @@ module Puppet
:mode => 0640,
:desc => "Where the puppetd web server logs."
},
+ :http_proxy_host => ["none",
+ "The HTTP proxy host to use for outgoing connections. Note: You
+ may need to use a FQDN for the server hostname when using a proxy."],
+ :http_proxy_port => [3128,
+ "The HTTP proxy port to use for outgoing connections"],
:server => ["puppet",
"The server to which server puppetd should connect"],
:ignoreschedules => [false,
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb
index 38f40a827..606aa0019 100644
--- a/lib/puppet/network/xmlrpc/client.rb
+++ b/lib/puppet/network/xmlrpc/client.rb
@@ -99,6 +99,13 @@ module Puppet::Network
hash[:Path] ||= "/RPC2"
hash[:Server] ||= Puppet[:server]
hash[:Port] ||= Puppet[:masterport]
+ hash[:HTTPProxyHost] ||= Puppet[:http_proxy_host]
+ hash[:HTTPProxyPort] ||= Puppet[:http_proxy_port]
+
+ if "none" == hash[:HTTPProxyHost]
+ hash[:HTTPProxyHost] = nil
+ hash[:HTTPProxyPort] = nil
+ end
@puppet_server = hash[:Server]
@puppet_port = hash[:Port]
@@ -107,8 +114,8 @@ module Puppet::Network
hash[:Server],
hash[:Path],
hash[:Port],
- nil, # proxy_host
- nil, # proxy_port
+ hash[:HTTPProxyHost], # proxy_host
+ hash[:HTTPProxyPort], # proxy_port
nil, # user
nil, # password
true, # use_ssl