Skip to content

Conversation

AndreyAlifanov
Copy link
Contributor

Patch for bypass list in proxy.
Now vcpkg ignores this setting, and it is real problem in corporate networks behind proxy.
Especially with mixed environments: some packages are public, some are private.

In Windows I turned on WPAD for WinHTTP.
In Linux I added "no_proxy" element to be passed to curl.

@AndreyAlifanov
Copy link
Contributor Author

@microsoft-github-policy-service agree

@microsoft-github-policy-service agree

if (GetEnvironmentVariableW(L"HTTPS_PROXY", https_proxy_env, sizeof(https_proxy_env) / sizeof(wchar_t)))
{
access_type = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
proxy_setting = https_proxy_env;
proxy_bypass_setting = L"<local>";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I observe tls12-download said <local> while the main product said nullptr; I think x-download is more widely used and thus want to resolve conflicts in favor of it, so I changed this one to nullptr.

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also fixed tls12-download.c; can you double check the changes I pushed?

@BillyONeal BillyONeal changed the title Bypass list for proxy Connect the NO_PROXY environment variable to the WinHTTP backend to match the curl backend Mar 20, 2025
@BillyONeal BillyONeal enabled auto-merge (squash) March 20, 2025 19:34
@BillyONeal
Copy link
Member

Thanks for your contribution!

@BillyONeal BillyONeal merged commit 0b39a44 into microsoft:main Mar 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants