1. 打开https://www.ipaddress.com/
查询 github.global.ssl.fastly.net 和 github.com 两个地址
多查几次,选择一个稳定,延迟较低的 ip 按如下方式添加到host文件的最后面
2. host文件
-
windows系统的hosts文件的位置如下:
C:\Windows\System32\drivers\etc\hosts
-
mac/linux系统的hosts文件的位置如下:
/etc/hosts
3. 重启浏览器,或刷新DNS缓存,告诉电脑hosts文件已经修改,
linux/mac执行sudo /etc/init.d/networking restart命令;
windows在cmd中输入ipconfig /flushdns命令即可。
4. github-production-release-asset-2e65be.s3.amazonaws.com 服务器的连接
在首次运行 react naticve 项目时, 遇到了如下的问题:
Failed to connect to github-production-release-asset-2e65be.s3.amazonaws.com port 443: Operation time out Command /bin/sh failed with exit code 7。
具体原因不详,但是把info.plist的文件中http改成https的请求就可以了。
办法一:pcloud网盘
将下载链接复制下来,然后转存到pcloud上,速度很快。
办法二:hosts文件
在hosts文件里添加该行,亲测有效。
54.231.98.184 github-com.s3.amazonaws.com
5. 如何修改host文件登陆google
# Amazon AWS Start
54.239.31.69 aws.amazon.com
54.239.30.25 console.aws.amazon.com
54.239.96.90 ap-northeast-1.console.aws.amazon.com
54.240.226.81 ap-southeast-1.console.aws.amazon.com
54.240.193.125 ap-southeast-2.console.aws.amazon.com
54.239.54.102 eu-central-1.console.aws.amazon.com
177.72.244.194 sa-east-1.console.aws.amazon.com
176.32.114.59 eu-west-1.console.aws.amazon.com
54.239.31.128 us-west-1.console.aws.amazon.com
54.240.254.230 us-west-2.console.aws.amazon.com
54.239.38.102 s3-console-us-standard.console.aws.amazon.com
54.231.49.3 s3.amazonaws.com
52.219.0.4 s3-ap-northeast-1.amazonaws.com
54.231.242.170 s3-ap-southeast-1.amazonaws.com
54.231.251.21 s3-ap-southeast-2.amazonaws.com
54.231.193.37 s3-eu-central-1.amazonaws.com
52.218.16.140 s3-eu-west-1.amazonaws.com
52.92.72.2 s3-sa-east-1.amazonaws.com
54.231.236.6 s3-us-west-1.amazonaws.com
54.231.168.160 s3-us-west-2.amazonaws.com
52.216.80.48 github-cloud.s3.amazonaws.com
54.231.40.3 github-com.s3.amazonaws.com
52.216.20.171 github-production-release-asset-2e65be.s3.amazonaws.com
52.216.228.168 github-production-user-asset-6210df.s3.amazonaws.com
来源:https://www.cnblogs.com/xiang--liu/p/9710207.html