: Set ELECTRON_GET_USE_PROXY=true to force the downloader to respect your system's HTTP_PROXY or HTTPS_PROXY environment variables.
: You can also set the proxy directly through npm commands: npm config set all_proxy=http://your-proxy-address:port Use code with caution. Popular Public Mirrors
: GitHub's global CDN may be slow in certain areas. Mirrored sites like npmmirror (formerly Taobao) offer significantly higher bandwidth for users in Asia. electron download mirror proxy
ELECTRON_NIGHTLY_MIRROR : Used specifically for nightly builds. Configuring Proxies for Restricted Networks
An is a configuration that redirects these requests to a faster, local, or accessible server to ensure seamless development. Why Use a Mirror Proxy? : Set ELECTRON_GET_USE_PROXY=true to force the downloader to
export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" npm install electron Use code with caution. :
When developing desktop applications with Electron , one of the most common bottlenecks is the initial installation phase. During npm install electron , the module attempts to download prebuilt binaries—often over 50MB—directly from GitHub's release page. For developers in regions with restricted GitHub access or within strict corporate networks, this process can be painfully slow or fail entirely. Why Use a Mirror Proxy
: Many enterprise environments block direct downloads from GitHub for security or compliance reasons, requiring a custom internal mirror.
You can set these temporarily in your terminal or permanently in your system profile ( .bashrc , .zshrc , or Windows System Properties). :
The most efficient way to set up a mirror is through environment variables. This allows you to override the default GitHub URL used by the @electron/get utility. 1. Using Environment Variables