azure-sdk-for-cpp
azure-sdk-for-cpp copied to clipboard
[Feature Request] Request to support proxy auth for azure-sdk-for-cpp
Hi Azure team, We are need to using proxy auth (username and password). We found your SDK is not support yet.
Could you support this feature for Curl transport?
https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core/inc/azure/core/http/curl_transport.hpp
https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core/src/http/curl/curl.cpp
https://curl.se/libcurl/c/CURLOPT_PROXYAUTH.html
In addition, we also submit a ticket to azure support portal (Task Number: 2112140060002220) and they suggest us to creating a issue to this Git repo.
Circle Chen Trend Micro
Thank you for submitting this request. We will look into adding this support in a future release.
Hello @anyoiuo, thank you for reaching out.
Have you tried using proxy environment variables to set the full proxy configuration?
Something like
export http_proxy=http://USERNAME:PASSWORD@SERVER:PORT/
Libcurl should honor the env vars as mentioned here: https://curl.se/libcurl/c/CURLOPT_PROXY.html
The options can be easily added to the libcul transport adapter options. However, there's not currently an available strategy for testing that it would work as expected ( No proxy with auth within CI or test env ). Coverage or correctness support might be missing. I need to talk to the team about this to see alternatives.
In the mind time, if using env vars for the proxy won't work for you, you can also give it a try to implement a custom transport adapter where you can take control of the libcurl handle to set any configuration to it before performing the request. See an example of it here: https://github.com/vhvb1989/libcurl-callbacks-transport-adapter
Will be back to you about implementing this.
We already added this options and modified some code. Currently, it is work properly. We are waiting to the official support for it.
Hello @anyoiuo
We’re very glad that you are unblocked and are successful with the proxy support you added yourself. At this time, we have higher priorities and there is no timeline for when official support will be introduced.
Hi @anyoiuo. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve
” to remove the “issue-addressed” label and continue the conversation.
Hi @anyoiuo, since you haven’t asked that we “/unresolve
” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve
” to reopen the issue.
/unresolve
FWIW, this work item is included in the /feature/websockets.
We're currently vetting the other work in this branch with partners and hope to have this fully merged with main sometime this fall (3Q 2022).