IssueRaiser

Extension proxy support

Proxy support for Visual Studio Code has been introduced recently through environment variables/settings (see https://code.visualstudio.com/docs/setup/setup-overview#_proxy-server-support). As an extension developer I would like to use these settings when requesting resources from the internet. My current implementation fails for users using a proxy. What is the recommended way for an extension to use a proxy? I could not find a `vscode` API that exposes methods to make requests using a proxy other than access to the proxy settings (`workspace.getConfiguration()`) and implementing everything on my own. Looking at the Visual Studio Code code base I identified the code that adds support for proxies, but copy&paste it into my extension would result in duplicated and potentially outdated code, which is something I want to avoid whenever possible. As I am probably not the only extension developer accessing the internet, I would like to hear your opinion on this issue. Any feedback would be greatly appreciated.

Posted by CodeZombieCH on Sep 25, 2016, 10:18 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

support (Network)

Extension proxy support

CodeZombieCHSep 25, 2016, 10:18 PM

Proxy support for Visual Studio Code has been introduced recently through environment variables/settings (see https://code.visualstudio.com/docs/setup/setup-overview#_proxy-server-support). As an extension developer I would like to use these settings when requesting resources from the internet. My current implementation fails for users using a proxy. What is the recommended way for an extension to use a proxy? I could not find a `vscode` API that exposes methods to make requests using a proxy other than access to the proxy settings (`workspace.getConfiguration()`) and implementing everything on my own. Looking at the Visual Studio Code code base I identified the code that adds support for proxies, but copy&paste it into my extension would result in duplicated and potentially outdated code, which is something I want to avoid whenever possible. As I am probably not the only extension developer accessing the internet, I would like to hear your opinion on this issue. Any feedback would be greatly appreciated.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue