Skip to content

output: add new net.proxy_env_ignore option [v4.0]#10638

Merged
cosmo0920 merged 3 commits into4.0from
4.0-output-proxy
Jul 23, 2025
Merged

output: add new net.proxy_env_ignore option [v4.0]#10638
cosmo0920 merged 3 commits into4.0from
4.0-output-proxy

Conversation

@edsiper
Copy link
Member

@edsiper edsiper commented Jul 22, 2025

Backport of #10613

This patch introduces a new configuration option: net.proxy_env_ignore (default: false).

By default, the upstream connection layer uses proxy settings from the environment (HTTP_PROXY, HTTPS_PROXY). However, in some scenarios, particularly when running multiple plugins with differing proxy needs, this default can cause unintended routing.

The new option net.proxy_env_ignore allows a plugin to explicitly disable the use of environment-based proxy configuration. When set to true, Fluent Bit will skip any proxy settings defined via environment variables, relying solely on plugin-level proxy settings (if provided).

e.g:

setting up an invalid proxy port (8081), however functional proxy runs in port 8080

export HTTP_PROXY=http://localhost:8081
fluent-bit -i random \
           -o opentelemetry \
              -p host=127.0.0.1 
              -p port=4328 
              -p proxy=http://127.0.0.1:8080 
              -p net.proxy_env_ignore=true

This enhancement improves plugin-level control over network behavior when relying on the upstream interface.


Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

edsiper added 3 commits July 22, 2025 17:22
When HTTP_PROXY, HTTPS_PROXY or NO_PROXY are set in the environment, the upstream use those
defaults for proxy needs. There are cases where we don't want certain plugins use those, this new
configuration net.proxy_env_ignore disables the proxy set by environment variables and can be
used inside the plugins that relies in the upstream interface.

Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
@edsiper edsiper changed the base branch from master to 4.0 July 22, 2025 23:25
@edsiper edsiper changed the title output: add new net.proxy_env_ignore option output: add new net.proxy_env_ignore option [v4.0] Jul 22, 2025
@cosmo0920 cosmo0920 merged commit d9be919 into 4.0 Jul 23, 2025
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants