Xuanwo commented on issue #6871: URL: https://github.com/apache/opendal/issues/6871#issuecomment-7198854680
Per-operator HTTP proxy configuration is now supported in Python via `context.http.proxy` (implemented in #9181, with Python regression coverage in #9183). This is available in builds that include #9181 (it was not in the previously tested `0.47.12` package). ```python from opendal import Operator proxy_url = "http://proxy.example.com:8080" proxied = Operator( "s3", bucket="my-bucket", region="us-west-2", **{"context.http.proxy": proxy_url}, ) default = Operator( "s3", bucket="my-bucket", region="us-west-2", ) ``` `context.http.proxy` accepts an `http://` or `https://` URL, applies only to the operator that sets it, and works across `Operator` and `AsyncOperator` via the constructor, `from_uri`, and `from_config`. Legacy `proxy` and `http_proxy` options remain ignored. Omitting `context.http.proxy` on a sibling operator inherits the default HTTP transport and ambient environment settings (such as `HTTP_PROXY` / `HTTPS_PROXY`), connecting directly when no ambient proxy is set. In our loopback verification (`bindings/python/tests/test_operator_proxy.py` and the follow-up sync/async probe), clearing ambient proxy variables was only a test condition to isolate the default sibling from the host environment; it is not needed to select a per-operator proxy. Closing this issue as resolved. *AI-generated maintenance comment.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
