Document
How to access GitHub from inside China

How to access GitHub from inside China

GitHub, as we all know, is the world’s largest hosting platform for open source and software projects. There are a large number of excellent open sour

Related articles

iTop VPN Premium License Key for Free 2024 Giveaway Who is Angus Cloud dating? How To Get LinkedIn Premium For Free: Ultimate 2024 Guide How to Get a 7-day NordVPN Free Trial on All Devices Trillwave

GitHub, as we all know, is the world’s largest hosting platform for open source and software projects. There are a large number of excellent open source software published on this platform every day from all over the world.

Because of China’s heavy censoring system, access to Github from inside the country often slowed down or, in many occasions, completely taken down.

want speed download speed GitHub China , you is need need use domestic acceleration service . able afford , you is use use proxy VPN speed access speed . , you is use use following services achieve acceleration :

GitHub mirrors

You is access access Github web proxies . proxies is send send requests Github forward response browser .

Here are the two most commonly used mirror addresses:

In other words, the above mirror is a clone of GitHub.

The content of the website is a fully synchronized mirror of GitHub, forwarded to you in realtime.

, especially working hours , web proxies is send send requests Github blocks . cases , you is need need find way access Github .

GitHub personal proxy using Cloudflare Workers

Cloudflare is the only international CDN that isn’t blocked in China.

By leveraging the power of Cloudflare Workers, a serverless platform for Javascript, you can build your own web proxy to circumvent Github blocks.

Here’s two demos of what a Github personal proxy would look like.

If you can’t open the demos, you can still clone hunshcn/gh-proxy and use the code to roll your own site.

Please note that this project does not allow you to browse Github . gh-proxy only supports git cloning through the proxy and downloading zipped version of repositories.

Github accelerated download (GitHub 加速下载)

Another web proxies you can instantly use is GitHub 加速下载 which literally means “Github accelerated download” .

To use it, just copy the repository address and paste it into the input box at toolwa.com/github/ to browse and download from Github!

Address: toolwa.com/github/

Google Chrome GitHub acceleration plugin (recommended-convenient and fast)

directly access Google store , you is go chrome web store download extension called ” GitHub 加速工具 ” ( GitHub acceleration plugin ) help downloading .

case unable reach chrome web store , extension downloaded :

Link: pan.baidu.com/s/1b3xzNrJb…

Password: tm97

GitHub raw address

want files repository , you is access access raw.githubusercontent.com instead web interface https://github.com .

Sometimes, even the raw domain can be blocked. In this case, there a twist to this method. Replace raw.githubusercontent.com with raw.staticdn.net and the file is accessible again.

Using Gitee to fork from Github

Gitee, a Chinese Github alternative, offers server-side forking/cloning from Github.

Simply visit the gitee website at gitee.com/ and log in, then select “Import repository from GitHub/GitLab” at the top as follows:

Now paste your Github repository URL address into the import page and click Import:

Wait import operation complete , download browse corresponding GitHub repository code inside repo created

You can also click the “Refresh” button at the top of the repository to synchronize the Github code repository.

9. Hardcode Github’s IP in HOSTS file

  1. Obtain the global.ssl.fastly.net address of github.

    Go to : github.global.ssl.fastly.net.ipaddress.com/#ipinfo .
    Next, obtain the subdomain name and the IP address of the Fastly server that serves Github content.
    E.g : 199.232.69.194 for github.global.ssl.fastly.net

  2. Repeat the steps above, but for github.com itself.

    Visit: github.com.ipaddress.com/#ipinfo to get domain name and the corresponding IP address.
    E.g : 140.82.114.4 github.com

  3. Modify the host file to map Github domain names to the IPs we’ve found

    Windows systems , need edit C : WindowsSystem32driversetchosts file .
    Linux systems , you is need need edit ( root access ) file located /etc / hosts .
    Simply include these lines in your hosts file and then you can access Github again.
    199.232.69.194 github.global.ssl.fastly.net
    140.82.114.4 github.com

Conclusion

Manually circumventing China’s Firewall to access Github is a hit-and-miss task. If none of the solutions above works in your situation, consider using a VPN.

Remember to avoid free VPNs all over the internet because they can mix your traffic with bad people. If you don’t mind fiddling with configurations, we would recommend setting up a personal, private V2Ray or NaiveProxy server of your own.