Warning: Undefined array key "night" in /www/wwwroot/dhaomu.com/wp-content/themes/b2/header.php on line 18

GitHub国内加速:利用fastgithub开源软件优化访问

GitHub国内加速:利用fastgithub开源软件优化访问!在前不久不知啥原因github彻底被封掉了。全国ping都超时。甚至某些电信网络的dns直接将github.com跳转到反诈网页。

GitHub国内加速:利用fastgithub开源软件优化访问!在前不久不知啥原因github彻底被封掉了。全国ping都超时。甚至某些电信网络的dns直接将github.com跳转到反诈网页。

GitHub国内加速:利用fastgithub开源软件优化访问插图
GitHub国内加速:利用FastGithub开源软件优化访问

哎,这对于国内的部分童鞋来说应该算是一个噩耗了。毕竟我们好多项目的运行或编译都对Github有或多或少的依赖!希望对有需要的童鞋有帮助!且用且珍惜了!

阻断分析

目前看来阻断了Github域名解析的大部分IP。不过貌似还有一些漏网的。

比如:140.82.112.3

直接修改Hosts 也能访问Github!

140.82.112.3   github.com

更完整Hosts 请访问:

GitHub国内加速:利用fastgithub开源软件优化访问插图1
GitHub国内加速:利用fastgithub开源软件优化访问插图1

GithubHosts轻松解决无法访问Github的囧境

如何能更便捷,更快,找到我们需要的IP呢?这里推荐一个开源仓库!

开源仓库

https://github.com/dotnetcore/FastGithub

主要功能

  • 提供域名的纯净IP解析;
  • 提供IP测速并选择最快的IP;
  • 提供域名的tls连接自定义配置;
  • google的CDN资源替换,解决大量国外网站无法加载js和css的问题;
  • 特别提醒:不是代理爬墙访问!!!!

软件下载

官方仓库提供releases下载。如果你访问不到。可以来下载我这里分流的。

https://pan.ruyo.cc/%E4%BB%A3%E7%A0%81/FastGithub

软件运行

windows-x64桌面

双击运行FastGithub.UI.exe

windows-x64服务

fastgithub.exe start // 以windows服务安装并启动
fastgithub.exe stop // 以windows服务卸载并删除

linux-x64终端

sudo ./fastgithub

设置系统自动代理为http://127.0.0.1:38457,或手动代理http/https为127.0.0.1:38457

linux-x64服务

sudo ./fastgithub start // 以systemd服务安装并启动

sudo ./fastgithub stop // 以systemd服务卸载并删除

设置系统自动代理为http://127.0.0.1:38457,或手动代理http/https为127.0.0.1:38457

macOS-x64

双击运行fastgithub

安装cacert/fastgithub.cer并设置信任

设置系统自动代理为http://127.0.0.1:38457,或手动代理http/https为127.0.0.1:38457

docker-compose一键部署

准备好docker 18.09, docker-compose.

在源码目录下,有一个docker-compose.yaml 文件,专用于在实际项目中,临时使用github.com源码,而做的demo配置。

根据自己的需要更新docker-compose.yaml中的sample和build镜像即可完成拉github.com源码加速,并基于源码做后续的操作。

操作步骤

Linux

linux下载 fastgithub 可执行文件。 直接启动即可。

也可以直接执行下面的脚本,完成运行~

wget https://pan.ruyo.cc/d/%E4%BB%A3%E7%A0%81/FastGithub/fastgithub_linux-x64.zip
unzip fastgithub_linux-x64.zip

cd fastgithub_linux-x64

./fastgithub

启动后输出内容:

[root@VM_centos ~]# ./fastgithub 
2022-12-18T22:14:30.4512754+08:00 [INF]
FastGithub.HttpServer.CaCertInstallerOfLinuxRedHat
已自动向系统安装CA证书cacert/fastgithub.crt

2022-12-18T22:14:30.6839719+08:00 [INF]
FastGithub.HttpServer
已监听http://localhost:38457,http代理服务启动完成

2022-12-18T22:14:30.7440714+08:00 [WRN]
FastGithub.DomainResolve.DnscryptProxy
dnscrypt-proxy启动失败:Could not find a part of the path '/root/dnscrypt-proxy/dnscrypt-proxy.toml'.

2022-12-18T22:14:30.8052849+08:00 [INF]
FastGithub.AppHostedService
FastGithub启动完成,当前版本为v2.1.4,访问 https://github.com/dotnetcore/fastgithub 关注新版本

2022-12-18T22:14:30.9060862+08:00 [INF]
Microsoft.Hosting.Lifetime
Now listening on: https://localhost:38443

2022-12-18T22:14:30.9070461+08:00 [INF]
Microsoft.Hosting.Lifetime
Now listening on: http://localhost:3880

2022-12-18T22:14:30.9072494+08:00 [INF]
Microsoft.Hosting.Lifetime
Now listening on: http://localhost:38457

2022-12-18T22:14:30.9087496+08:00 [INF]
Microsoft.Hosting.Lifetime
Application started. Press Ctrl+C to shut down.

2022-12-18T22:14:30.9090075+08:00 [INF]
Microsoft.Hosting.Lifetime
Hosting environment: Production

2022-12-18T22:14:30.9091938+08:00 [INF]
Microsoft.Hosting.Lifetime
Content root path: /root

尝试访问Github

[root@VM_centos ~]# wget github.com
--2022-12-18 22:15:15--  http://github.com/
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/ [following]
--2022-12-18 22:15:16--  https://github.com/
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

    [  <=>                                                                              ] 222,987      662KB/s   in 0.3s   

2022-12-18 22:15:16 (662 KB/s) - ‘index.html’ saved [222987]

Windows

下载可执行文件,双击【FastGithub.UI.exe】运行即可,软件启动成功后,然后电脑就可以访问Github了,访问速度还不错。下载文件大概300KB/s

最后总结

该软件使用起来也比较方便!还是非常不错的一款软件!在国内服务器上运行也没啥问题。有童鞋说:这不就是修改Hosts一个道理么?其实不仅仅是该软件还会修改SNI信息,防止阻断~唯一的缺点,如果有一天所有的IP都被Q完。那可能这个软件也就……

温馨提示:
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:duhaomu@163.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明

给TA赞赏
共{{data.count}}人
人已赞赏
编程技巧

谷歌浏览器如何查看User-Agent?谷歌浏览器查看User-Agent的方法

2019-6-8 9:00:00

编程技巧

PbootCMS网站模板禁止自动提取缩略图

2019-7-13 0:00:00

0 条回复 A文章作者 M管理员

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914
----《》
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索