Skip to content
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

Added http.noProxy setting which is same as NO_PROXY env variable value that is already present currently #211958

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/vs/platform/request/common/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ function registerProxyConfigurations(scope: ConfigurationScope): void {
markdownDescription: localize('proxyKerberosServicePrincipal', "Overrides the principal service name for Kerberos authentication with the HTTP proxy. A default based on the proxy hostname is used when this is not set."),
restricted: true
},
'http.noProxy': {
type: 'string',
mohankumarelec marked this conversation as resolved.
Show resolved Hide resolved
markdownDescription: localize('noProxy', "The noProxy variable specifies domain names, separated by commas, for which proxy settings should be ignored for HTTP/HTTPS requests made by extensions."),
mohankumarelec marked this conversation as resolved.
Show resolved Hide resolved
restricted: true
},
'http.proxyAuthorization': {
type: ['null', 'string'],
default: null,
Expand Down
3 changes: 2 additions & 1 deletion src/vs/platform/windows/electron-main/windowImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,8 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {
newHttpProxy = newHttpProxy.substr(0, newHttpProxy.length - 1);
}

const newNoProxy = (process.env['no_proxy'] || process.env['NO_PROXY'] || '').trim() || undefined; // Not standardized.
const newNoProxy = (this.configurationService.getValue<string>('http.noProxy') || '').trim()
|| (process.env['no_proxy'] || process.env['NO_PROXY'] || '').trim() || undefined; // Not standardized.
if ((newHttpProxy || '').indexOf('@') === -1 && (newHttpProxy !== this.currentHttpProxy || newNoProxy !== this.currentNoProxy)) {
this.currentHttpProxy = newHttpProxy;
this.currentNoProxy = newNoProxy;
Expand Down