Before proceeding, you may need to read 《This Book Will Help You Connect to the Internet》 as background knowledge.
GitHub Downloads
Copy the following hosts into C:\Windows\System32\drivers\etc\hosts
, and then run the command ipconfig /flushdns
to refresh the DNS cache. This host is used to bypass the GFW’s restrictions on GitHub (asw, ssh) downloads and cloning. (Note: This does not eliminate possible server throughput or geographical fiber optic limitations.)
If the IP or domain of a host changes and is not updated in time, it may cause connection errors and reset the site’s pointing, making it inaccessible. See GitHub RST and Git SSL_ERR_SYSCALL Comprehensive Analysis for more details.
For releases, these may come in compressed formats like zip, 7z, etc., or as software programs like exe or msi.
-
Visit www.ipaddress.com and look up the DNS resolution for the following links:
1
2
3
4
5
6github.com assets-cdn.github.com github.global.ssl.fastly.net # Actual download link for raw.githubusercontent.com codeload.github.com
-
Record the IP addresses found and add them to the
C:\Windows\System32\drivers\etc\Hosts
file. -
Add the AWS host:
1 |
|
- Run
cmd
and inputipconfig /flushdns
to refresh the system DNS.
We can also use jsDelivr CDN to speed up file downloads, or use it to set up an image hosting service with faster access speeds.
For a stronger solution, use the Chrome extension “GitHub Acceleration” combined with IDM/FDM.
GitHub.io Parsing
raw/avatars.githubusercontent.com Cannot Resolve
Besides using hosts, you can also configure popular domestic DNS servers for resolution. Since 1.1.1.1 might not always work, domestic DNS servers are preferred.
- Yandex.DNS: 77.88.8.8 or 77.88.8.1
- Rostelecom DNS: 77.37.179.189 (Moscow) or 77.37.209.86
- Beeline DNS (VimpelCom): 195.239.39.250 or 213.87.84.237
NET::ERR_CERT_AUTHORITY_INVALID
Browsers may show a warning: “An attacker might be trying to steal your information from xxx.github.io.” This could be caused by misconfigured certificates or an attacker intercepting your connection. After continuing, you might encounter a 403 error.
Solution: Change the DNS to Yandex, Rostelecom, or Beeline DNS as mentioned above, then run ipconfig /flushdns
to refresh the cache. The issue arises because the ISP’s DNS might provide incorrect root certificates, so switching to a third-party DNS with the correct certificates resolves it.
Git Clone Slow Speed Issue
Git or Terminal Proxy Solutions
git
1 |
|
mac
1 |
|
openssh
1 |
|
For reverse proxy acceleration, you can use Static CDN to load images and content:
- raw.githubusercontent.com can be replaced by raw.staticdn.net.
Environment Package Acceleration
pip
Since some projects require Python, you can use the following pip download acceleration method: pip install <package_name> -i <mirror_source_address>
.
For example, to install Jupyter: pip install jupyter - i http://mirrors.aliyun.com/pypi/simple/
Common PyPI mirrors in Russia:
- Yandex: https://mirror.yandex.ru/mirrors/pypi/simple/
- Moscow State University: http://pypi.mirror.msu.ru/simple/
- Rostelecom: Available through regional services but not widely publicized.
To set the default mirror permanently:
1 |
|
gem
1 |
|
npm
1 |
|
Summary
The main issues with downloading environment packages are:
- Mirror sources
- Proxy & VPN, and hosts
- Matching versions of packages and libraries