美文网首页开发工具
【转载】GitHub加速

【转载】GitHub加速

作者: dantes1844 | 来源:发表于2019-06-07 09:07 被阅读0次

作为笔记收藏,原文链接。

加速国内Github访问
1 获取GitHub官方CDN地址
2 修改系统Hosts文件
3 刷新系统DNS缓存
由于某些原因,国内访问Github会异常缓慢,在clone仓库时甚至只有10k以下的速度,下载半天有时还会失败需要从头再来,甚是让人恼火。
本文介绍通过修改系统hosts文件的办法,绕过国内dns解析,直接访问GitHub的CDN节点,从而达到加速的目的。不需要科学上网,也不需要海外的服务器辅助。

1. 获取GitHub官方CDN地址

打开https://www.ipaddress.com/

查询以下三个链接的DNS解析地址

  1. github.com
  2. assets-cdn.github.com
  3. github.global.ssl.fastly.net

记录下查询到的IP地址。

2. 修改系统Hosts文件

打开系统hosts文件(需管理员权限)。
路径:C:\Windows\System32\drivers\etc

在末尾添加三行记录并保存。(需管理员权限,注意IP地址与域名间需留有空格,notepad++在保存时会提示需要权限,自动切换成管理员模式打开)

# 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

  192.30.253.112     github.com

  151.101.72.133    assets-cdn.github.com

  151.101.193.194    github.global.ssl.fastly.net

3 刷新系统DNS缓存
Windows+X 打开系统命令行(管理员身份)或powershell

运行 ipconfig /flushdns 手动刷新系统DNS缓存。

相关文章

  • 【转载】GitHub加速

    作为笔记收藏,原文链接。 加速国内Github访问1 获取GitHub官方CDN地址2 修改系统Hosts文件3 ...

  • (转载)Github网站加速访问

    C:\Windows\System32\drivers\etc找到host文件 右键 属性 点击编辑 选中写入 右...

  • 【转载】GitHub加速 ,GitHub下载速度太慢,国内git

    参考: https://github.com/chenxuhua/issues-blog/issues/3 htt...

  • github加速

    因被强了,所以有时访问GitHub会很慢,用绕过dns解析,在本地直接绑定host,该方法也可加速其他因为CDN被...

  • github加速

    一 代理 HTTP Socket5 取消代理 二 修改hosts

  • github加速

    hosts文件位置 刷新

  • github 加速

    github 的下载速度是真的慢,不到 10kb/s,叔可忍婶不可忍啊!搜索网上分享,大致有三种方法: 方法一 修...

  • github加速

    1. 查询以下四个链接的DNS解析地址 github.com assets-cdn.github.com gith...

  • Github加速

    转载:https://blog.csdn.net/networken/article/details/105122...

  • github加速

    GitHub 镜像访问 这里提供两个最常用的镜像地址: https://github.com.cnpmjs.org...

网友评论

    本文标题:【转载】GitHub加速

    本文链接:https://www.haomeiwen.com/subject/apqmxctx.html