[Tip] [转] GitHub 访问慢解决办法

原文 Github访问慢解决办法

Github访问慢解决办法

原因

为什么慢?github的CDN被某墙屏了。

解决方法

绕过dns解析,在本地直接绑定host,该方法也可加速其他因为CDN被屏蔽导致访问慢的网站。

实现

在本地host文件中添加映射,步骤如下:

  1. 用文本编辑器打开hosts文件,位于C:\Windows\System32\drivers\etc目录下
  2. 打开 http://tool.chinaz.com/dns ,这是一个查询域名映射关系的工具
  3. 查询 github.global.ssl.fastly.net 和 assets-cdn.github.com 两个地址
  4. 多查几次,选择一个稳定,延迟较低的 ip 按如下方式添加到host文件
  5. 保存文件,重新打开浏览器,起飞。
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

151.101.25.194  github.global.ssl.fastly.net
151.101.128.133  assets-cdn.github.com
219.76.4.4 github-cloud.s3.amazonaws.com
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,461评论 19 139
  • 1. 概述 在网络环境中一般用户只需要在浏览器中输入url如www.sunny.com就可以到对应服务器获取相应的...
    ghbsunny阅读 8,250评论 0 7
  • 前面的课程,叶武滨老师都是分享的方法的问题,包括反思、列计划、怎么管理事物等。此次课叶老师和我们分享了方向层面的问...
    皓月环宇阅读 3,759评论 0 0
  • 和朋友們吃完大臉貓面魚,剩下了我和G去逛街,實際上我剛從南方城市買了一些衣服回來了,逛街純粹是陪G逛。 馬路邊路過...
    林素兮阅读 1,768评论 11 3