Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method to speed up the access to Github in China?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article shows you what is the way to accelerate access to Github in China, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Preface

GitHub believes that everyone is no stranger, the absolute trump card in the open source world, it is not too much to say that it is the cornerstone of small and medium-sized Internet companies.

However, due to some reasons, git-related operations are very slow in China, and there are many reasons for the slow access speed of GitHub in China, but the most direct and main reason is that the domain name of GitHub distribution acceleration network is contaminated by dns. Of course, slowness is something that every engineer can't stand.

Popularize the science about DNS pollution:

Domain server cache contamination (DNS cache pollution), also known as domain name server cache poisoning (DNS cache poisoning), refers to some domain name server packets deliberately or inadvertently created to point the domain name to an incorrect IP address. Generally speaking, there are reliable domain servers on the Internet, but in order to reduce the traffic pressure on the network, the general domain name servers will temporarily store the resolution records obtained from the upstream domain name server. the next time another machine requests to resolve the domain name, you can provide the service immediately. Once the cache of the local domain name server related to the domain is contaminated, the computer in the domain will be directed to the wrong server or server's URL.

Let's introduce the modification of Host, which is equivalent to bypassing domestic DNS parsing and directly accessing the CDN node of GitHub, thus achieving the goal of acceleration.

Step one.

Open the IPAddress.com website and query the IP addresses corresponding to the following three URLs

Github.comassets-cdn.github.comgithub.global.ssl.fastly.net

Step two

Modify the local computer system hosts file

Windows: C:\ Windows\ System32\ drivers\ etc

Linux: / etc/hosts

Add the following code directly at the end:

192.30.253.112 github.com151.101.184.133 assets-cdn.github.com151.101.185.194 github.global.ssl.fastly.net step 3

Flush the system dns cache (Windows)

Linux skips this step

Use the WIN+R shortcut to open the run window, enter the command: cmd and enter to enter the command line window. Then enter the command: ipconfig / flushdns enter and refresh the local dns cache data.

At this point, the acceleration is complete.

The above content is what is the way to speed up the access to Github in China? have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report