9
Proxy for VS Code
source link: https://discretetom.github.io/posts/vscode-http-proxy/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Setup HTTP Proxy for VS Code and Its Built-in Terminal
Including how to configure the authentication.
Proxy for VS Code
In settings.json
, add the following content:
{
"http.proxy": "<protocol>://<your-proxy-server>:<port>"
}
Tips:
- The
protocol
field is required, it has to be one ofhttp
,https
. - The
port
field is required. - The default value of
http.proxy
will inherit from the environment variablehttp_proxy
andhttps_proxy
. - There is only one
http.proxy
, nohttps.proxy
. - This setting will apply to VS Code itself and its plugins. For example, I’m using
Go
plugin, when I runGo: Install/Update Tools
command, this proxy will take effect. - This setting will not apply to the built-in terminal of VS Code.
Proxy for the Built-In Terminal
In settings.json
, add the following content:
{
"terminal.integrated.env.<platform>": {
"http_proxy": "<protocol>://<your-proxy-server>:<port>",
"https_proxy": "<protocol>://<your-proxy-server>:<port>"
}
}
Tips:
- The
platform
should be one ofwindows
,linux
orosx
. - The
http_proxy
andhttps_proxy
will take effect individually. You’d better set both of them.
Authentication
Use this format of URL:
<protocol>://<username>:<password>@<your-proxy-server>:<port>
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK