-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Support for proxy parameter in ElasticSearch client #2217
Comments
Scratching my head on this one as well. The urllib3 class was basically pieced together in this module and buried. Proxy settings are a standard feature w/ even the most basic web clients. Based on previous versions, it actually looks like it was removed. Was this on purpose? |
Hello! Sorry for the delay here. Nothing was removed - in fact the Elasticsearch Python client never supported proxies out of the box. Since elasticsearch-py 8.x relies on https://github.com/elastic/elastic-transport-python/ the workaround has changed and is now elastic/elastic-transport-python#53 (comment). I don't have immediate plans to add proxy support but the feature request makes sense so I'm leaving this open. |
It seems clear that each version has evolved to make it harder to use a proxy through each iteration. This is like contemplating whether it's a good idea to add rear-view mirrors into a car. |
Currently, there is no way to specify HTTP proxy urls for the ElasticSearch client to use when performing requests. Although issue #275 is marked as closed, there is no evidence of a solution implemented and supported by the client. We have tried to apply the recommended solutions, but none of the following have worked:
node_class="requests"
ornode_class=RequestsHttpNode
along withHTTP_PROXY
andHTTPS_PROXY
environment variables setRequestsHttpNode
to set the proxies at object constructionIn both cases, requests were not performed through the given proxy URL.
We propose to the addition of a
proxy
parameter (or aproxy_http
,proxy_https
parameter set) to support the definition of a proxy to be used by a transport backend.The text was updated successfully, but these errors were encountered: