For Chef Infra Client's outbound requests, configure the existing client.rb on the node where the client runs:

http_proxy 'http://proxy.example:8080'
https_proxy 'http://proxy.example:8080'
no_proxy 'chef.internal.example,localhost,127.0.0.1'

Use the intended internal exceptions. Separate proxy user and password settings are available when the intermediary needs authentication. This configures the node's Chef client, not a Chef Infra Server route for every managed machine.

During initialization, Chef can derive lowercase proxy environment values from this configuration when those keys are absent. Compare existing inherited values when an interactive run and service launch behave differently.

What the profile-file recipe actually changes

A cookbook writing an export script into a shell-profile directory creates an input for later consumers of that profile. It does not make the currently running Chef client reread a login shell's files or restart a managed application with a new environment.

For a managed service, set the service's supported environment or networking options. A command inheriting Chef's environment can use its variables only if that executable supports them. Keep internal Chef and application endpoints on their intended bypass routes.

Erthyglow kevrennek