Skip to content

feat: proxy support - #76

Merged
mfiedorowicz merged 6 commits into
developfrom
feat-proxy-support
Jan 7, 2026
Merged

feat: proxy support#76
mfiedorowicz merged 6 commits into
developfrom
feat-proxy-support

Conversation

@mfiedorowicz

Copy link
Copy Markdown
Member

This pull request adds robust HTTP/HTTPS proxy support to the Diode Python SDK, allowing users to route gRPC connections through proxies using standard environment variables. It also refactors authentication to use the requests library for improved certificate handling and proxy compatibility. The documentation is updated to explain proxy usage, and several internal helper functions are introduced for proxy detection and configuration.

Proxy support and configuration:

  • Added automatic detection and configuration of HTTP/HTTPS proxies via HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables, including logic for bypassing proxies for specific hosts. (netboxlabs/diode/sdk/client.py [1] [2] [3]
  • Updated documentation (README.md) with detailed proxy usage instructions, environment variable examples, and important notes for using proxies with TLS verification and MITM proxies.

gRPC channel and authentication improvements:

  • Refactored gRPC channel creation to support proxy connections, including secure channel enforcement when proxies are used, and added SSL target name override for proper certificate validation. (netboxlabs/diode/sdk/client.py netboxlabs/diode/sdk/client.pyL476-R693)
  • Replaced legacy http.client authentication logic with requests, enabling better handling of custom CA certificates and proxy compatibility, including cleanup of temporary certificate files. (netboxlabs/diode/sdk/client.py [1] [2]

Dependency updates:

  • Added requests as a required dependency in pyproject.toml to support new authentication and proxy features.

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
@mfiedorowicz mfiedorowicz self-assigned this Jan 5, 2026
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file markdown python labels Jan 5, 2026
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/site-packages/netboxlabs/diode/sdk
   client.py5094092%165–166, 185–187, 190–193, 482, 548, 553, 557, 643–648, 693–695, 700, 705, 710, 715, 725, 729, 733, 755, 776, 778, 852, 883, 891, 933, 969, 984–985, 992–993
   exceptions.py44393%69, 82–83
TOTAL5654392% 

Tests Skipped Failures Errors Time
154 0 💤 0 ❌ 0 🔥 1.415s ⏱️

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
…rgets

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
@mfiedorowicz
mfiedorowicz merged commit 5dae6c3 into develop Jan 7, 2026
6 checks passed
@mfiedorowicz
mfiedorowicz deleted the feat-proxy-support branch January 7, 2026 16:09
@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file markdown python released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants