feat: proxy support #76
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
requestslibrary 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:
HTTP_PROXY,HTTPS_PROXY, andNO_PROXYenvironment variables, including logic for bypassing proxies for specific hosts. (netboxlabs/diode/sdk/client.py[1] [2] [3]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:
netboxlabs/diode/sdk/client.pynetboxlabs/diode/sdk/client.pyL476-R693)http.clientauthentication logic withrequests, 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:
requestsas a required dependency inpyproject.tomlto support new authentication and proxy features.