Commit 90560edf0f43f5382bd539646988f7a96ea3809e for PUP-4020 added the ability to skip an http proxy if the host and port matched an entry in the NO_PROXY environment variable. However it didn't actually work because our connection factory passed the Site object instead of a String or URI.
Commit 90560edf0f43f5382bd539646988f7a96ea3809e for PUP-40204030 added the ability to skip an http proxy if the host and port matched an entry in the {{NO_PROXY}} environment variable. However it didn't actually work because our connection factory passed the {{Site}} object instead of a String or URI.
Commit 90560edf0f43f5382bd539646988f7a96ea3809e for PUP-4030 added the ability to skip an http proxy if the host and port matched an entry in the {{NO_PROXY}} environment variable. However it didn't actually work because our connection factory passed the {{Site}} object instead of a String or URI. To reproduce specify an unused http proxy port and try to not use a proxy for the puppet server:
{noformat} $ env NO_PROXY=$(bundle exec puppet config print server --section main) bundle exec puppet agent -t --http_proxy_host localhost --http_proxy_port 12345 Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Failed to open TCP connection to localhost:12345 (Connection refused - connect(2) for "localhost" port 12345) Info: Retrieving pluginfacts Error: /File[/Users/josh/.puppetlabs/opt/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to localhost:12345 (Connection refused - connect(2) for "localhost" port 12345) Error: /File[/Users/josh/.puppetlabs/opt/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: Failed to open TCP connection to localhost:12345 (Connection refused - connect(2) for "localhost" port 12345) ... {noformat}
If the agent is configured to use an HTTP proxy and it attempts to connect to a host that matches an entry in the "NO_PROXY" environment variable, then puppet will not use the proxy, and instead connect directly to the host. This feature was originally introduced in PUP-4030, but it didn't work.