Domestic solve the problem of slow access to GitHub

origin

I do not know the reason is not because of the recent meeting, visit GitHub giant slow, hanging in a heart. Solutions looked online, nothing more than modify the Hosts file.

Ready to work

Visit our Web site http://github.com.ipaddress.com/ , were acquired github.com, github.global.ssl.fastly.netcorresponding IP. Here Insert Picture Description
Here Insert Picture Description
Information obtained as follows:

192.30.253.113		github.com
151.101.185.194		github.global.ssl.fastly.net

Specific Solutions

Windows

Windows Hosts file is located C:\Windows\System32\drivers\etc, the proposed changes before a backup copy of the Hosts file (see other heavyweights are switched with a host of switchHost tool).

  1. The following information will be added to the Hosts file, save
    192.30.253.113		github.com
    151.101.185.194		github.global.ssl.fastly.net
    
  2. Update the DNS cache
    # 打开CMD运行如下命令
    ipconfig /flushdns
    

Linux

  1. Edit the Hosts file
    vi /etc/hosts
    
  2. Press the iedit mode, insert the following text
    192.30.253.113		github.com
    151.101.185.194		github.global.ssl.fastly.net
    
  3. Press the Esckey to exit edit mode, enter the :wq!save and exit.
  4. Reboot the machine or restart the service to make Hosts entry into force, this had nothing I did not restart, test feeling just fine.

test

Revisit https://github.com , it is not very fast !!!
Here Insert Picture Description

References:

  1. Domestic solve the problem of slow access github
  2. / Etc / hosts file on how the changes to take effect

Guess you like

Origin blog.csdn.net/yh0503/article/details/90233216