Skip to content

Conversation

@pwhelan
Copy link
Contributor

@pwhelan pwhelan commented Apr 4, 2025

Summary

Add a new net.http_proxy as well as a new net.no_proxy setting that can be set both globally as well as individually for any input client or output plugin.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

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.

@leonardo-albertovich
Copy link
Contributor

Please let me know if I missed something here but the thing is that there is no HTTP proxy client implementation at the moment. AFAIK it used to be implemented directly in the http client and when I created the new one I didn't include for "reasons" I can't remember.

In any case, if we are going to move it to the networking layer we'll probably need to make a few tweaks to the HTTP client to ensure that we can use it in a transient way and pass the socket around so we can establish the raw connection, use the existing HTTP client to negotiate the tunnel and then return the socket for the client code to use as if it was a freshly established connection.

@leonardo-albertovich
Copy link
Contributor

As for the "old" HTTP proxy approach I think we should implement that directly in the "client" part of the HTTP client component but we should have a conversation about it to ensure that we're not mixing things around so we don't have to rework it once it's done.

Copy link
Contributor

@leonardo-albertovich leonardo-albertovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a complete review, I just noticed this in the log and wanted to ensure that I don't forget to bring it up.

@pwhelan
Copy link
Contributor Author

pwhelan commented Apr 7, 2025

Please let me know if I missed something here but the thing is that there is no HTTP proxy client implementation at the moment. AFAIK it used to be implemented directly in the http client and when I created the new one I didn't include for "reasons" I can't remember.

So the proxy implementation in the old API disappeared when the client API was re-written?

@leonardo-albertovich
Copy link
Contributor

Please let me know if I missed something here but the thing is that there is no HTTP proxy client implementation at the moment. AFAIK it used to be implemented directly in the http client and when I created the new one I didn't include for "reasons" I can't remember.

So the proxy implementation in the old API disappeared when the client API was re-written?

Yes, to be specific I didn't implement it, IIRC I wanted to take the opportunity to improve the implementation rather than hacking together something sub optimal and it ended up not getting done.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2025

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Sep 7, 2025
Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
…nfig.

Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
…ent variables.

Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
…ables.

Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
…ream_set.

Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
…L in flb_input_upstream_set.

Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
…uble free in flb_output_upstream_set.

Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
…ble free in flb_input_upstream_set.

Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
…ut when not using a proxy.

Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
…using a proxy.

Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
@coderabbitai
Copy link

coderabbitai bot commented Oct 13, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pwhelan-net-proxy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

3 participants