Solve the problem of github page freeze, disconnection, etc.

mac system

1. Open the ipaddress.com webpage and find the ip corresponding to the following three URLs. My results are as follows:

140.82.114.4 github.com 
185.199.108.153 assets-cdn.github.com 
199.232.69.194 github.global.ssl.fastly.net
复制代码

2. Modify the sudo vi /etc/hosts file with superuser privileges (this file is read-only for ordinary users), copy the above content to the end of the file, and save the file.

3. Execute ping github.com to check the result, there will be no timeout phenomenon at this time:

64 bytes from 140.82.114.4: icmp_seq=0 ttl=48 time=320.110 ms
64 bytes from 140.82.114.4: icmp_seq=1 ttl=48 time=319.992 ms
64 bytes from 140.82.114.4: icmp_seq=2 ttl=48 time=320.131 ms
...
复制代码

windows system

1. The first step is the same as above, find the ip corresponding to the three URLs

2. Modify the file permissions of C:\Windows\System32\drivers\etc\hosts (general users only have readable permissions and cannot modify them. How to change the permissions of hosts? Right-click the file and select "Properties", then in "Security" Assign various permissions to the current user in the column), then copy the same content to the end of the file and save it.

3. Execute the following command in the terminal to refresh the DNS resolution cache

 ipconfig /flushdns
复制代码

4. Execute ping github.com to check the result, there will be no timeout phenomenon at this time:

来自 140.82.114.4 的回复:字节=32 时间=212 ms TTL=44
来自 140.82.114.4 的回复:字节=32 时间=215 ms TTL=44
...
复制代码

Summarize

Sure enough, technology is the first productive force. After the change, the page is no longer stuck, and you can enjoy the code with cv!

Guess you like

Origin juejin.im/post/7083738380680298526