About http proxy

xii Pri 0 Reputation points
2025-07-21T03:19:51.6633333+00:00

i'm a Chinese developer, and i'm using .sln project with vcpkg.

I've noticed that when I set VS2022 to English and create a .sln project, my project doesn't use the proxy (can't access github/microsoft/vcpkg). But if I set VS2022 to Chinese, the created .sln project can access github through the proxy.

i want know if i could force my project to use proxy?

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ethan Parker 0 Reputation points
    2025-12-05T20:35:46.9933333+00:00

    Yes, you can force your project and vcpkg to use a proxy. Visual Studio’s display language shouldn’t affect proxy behavior, so the difference you’re seeing is likely due to environment variables or system proxy settings applied under one language profile but not the other.

    To ensure your project always uses the proxy, set the proxy variables globally:

    Windows (System/User Environment Variables):

    HTTP_PROXY=http://your-proxy:port
    HTTPS_PROXY=http://your-proxy:port
    

    vcpkg-specific proxy setting:

    vcpkg_proxy=http://your-proxy:port
    

    After setting these, restart Visual Studio so the IDE and all build tools pick up the values.

    If you're using CMake, you can also force it with:

    setx HTTP_PROXY http://your-proxy:port
    setx HTTPS_PROXY http://your-proxy:port
    

    This ensures vcpkg, Git, and any tools launched by VS will route through the proxy regardless of the VS language setting.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.