Andrey Smirnov 7f89234523
fix: handle dynamic HTTP proxy settings for discovery client
Unfortunately, gRPC client library doesn't offer control on picking up
HTTP proxy for a connection, and relies on sync.Once protected value
which reads proxy variables from the environment just once.

As environment variables can be set dynamically, there is a chance that
dial might happen before they are set, so they are never respected after
that.

So I had to copy/adapt some part of grpc internal/transport parts to
enable dynamic loading of HTTP proxy, and use new dialer in discovery
client.

Fixes #10136

Also, while testing this with our small "air-gapped" tool I discovered
that our HTTP proxy test implementation is not complete, so this had to
be fixed as well.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit ebfdb91b4cd36b48c36c1523dc74bc6e1860f815)
2025-03-12 15:05:55 +04:00
..
2024-11-14 12:25:56 +03:00
2024-11-14 12:25:56 +03:00
2024-07-08 18:14:00 +03:00
2024-02-09 19:19:25 +03:00
2025-01-16 14:31:38 +04:00