9 ways to speed up accessing GitHub in China

9 ways to speed up accessing GitHub in China

For some reasons, the access speed to GitHub is really slow, images often fail to load, and sometimes projects cannot be downloaded. Although Gitee is good, it cannot replace GitHub's position in the programming world yet.

Last updated 4/15/2022 8:23 PM
猪哥
4 min read
Category
Sharing
Tags
GitHub

Source|https://urlify.cn/IFzQRb

Due to certain reasons, GitHub access speed is indeed too slow. Images often fail to load, and sometimes projects cannot be downloaded. Although Gitee is good, it still cannot replace GitHub's position in the programming world. So today, the author recommends several solutions to improve GitHub access speed. Just pick the one you like and try it!

1. GitHub Mirror Access

Here are two commonly used mirror addresses:

That is to say, the above mirrors are cloned versions of GitHub. You can visit these mirror sites, whose content is fully synchronized with GitHub, and then perform operations like downloading and cloning on these sites.

2. GitHub File Acceleration

Use Cloudflare Workers to accelerate GitHub release, archive, and project files. Deployment requires no server and comes with its own CDN.

The above websites are demo sites. If they cannot be accessed, you can check the open-source project: gh-proxy-GitHub (https://hunsh.net/archives/23/) to deploy your own file acceleration.

3. GitHub Accelerated Download

Simply copy the current GitHub URL and paste it into the input box to proxy the accelerated download!

URL: http://toolwa.com/github/

4. Accelerate Your GitHub

https://github.zhlh6.cn

Enter the GitHub repository URL, and use the generated URL for git ssh and other operations.

6. GitHub Raw Acceleration

The GitHub raw domain is not github.com but raw.githubusercontent.com. If the GitHub acceleration above cannot accelerate this domain, you can use the reverse proxy service provided by Static CDN.

Replace raw.githubusercontent.com with raw.staticdn.net to accelerate.

7. GitHub + Jsdelivr

The only drawback of jsdelivr is that it cannot fetch exe files and the exe and dmg files attached to Releases.

That is to say, if the exe file is attached to a Release but not in the code, it cannot be fetched. So it can only be used as a static file CDN, not for accelerating Release downloads.

8. Download via Gitee Fork Repository Relay

There are many related tutorials online. Here is a brief explanation of the operation.

Visit the Gitee website: https://gitee.com/ and log in. At the top, select 'Import Repository from GitHub/GitLab' as follows:

On the import page, paste your GitHub repository URL and click Import:

Wait for the import to complete, then download and browse the corresponding GitHub repository code in the imported repository. You can also click the 'Refresh' button at the top of the repository to sync the GitHub code repository.

9. Accelerate by Modifying the HOSTS File

Manually bind the CDN and IP addresses.

Step 1: Get GitHub's global.ssl.fastly address. Visit: http://github.global.ssl.fastly.net.ipaddress.com/#ipinfo to obtain the CDN and IP domain:

Result: 199.232.69.194 https://github.global.ssl.fastly.net

Step 2: Get github.com address

Visit: https://github.com.ipaddress.com/#ipinfo to obtain the CDN and IP:

Result: 140.82.114.4 http://github.com

Step 3: Modify the hosts file to map the IP addresses found above

Windows system:

  1. Modify the permissions of the C:\Windows\System32\drivers\etc\hosts file to allow writing: Right-click -> hosts -> Properties -> Security -> Edit -> Click Users -> Check the 'Write' permission for Users. As follows:

Then click OK.

  1. Right-click -> hosts -> Open with -> Select Notepad (or your preferred editor) -> Add the following content at the end:
199.232.69.194 github.global.ssl.fastly.net
140.82.114.4 github.com
Keep Exploring

Related Reading

More Articles
Same tag 4/13/2022

Xamarin Forms Goodlooking UI

An introduction to open-source mobile apps developed using Xamarin.Forms. If interested, you can visit the [GitHub](https://github.com/jsuarezruiz/xamarin-forms-goodlooking-UI) and [Gitee](https://gitee.com/dotnet9/xamarin-forms-goodlooking-UI) repositories to check them out and download the corresponding app projects for study.

Continue Reading