小飞机可以解决git clone没有返回的问题吗?

【1】Linux如何使用小飞机?
以ss为例,先下载客户端:
https://www.mediafire.com/folder/xag0zy318a5tt/Linux
下载客户端以后,右键把权限中“作为程序执行”勾选,打开界面

然后在github上找到免费的账号节点:
https://github.com/Alvin9999/new-pac/wiki/ss免费账号
ss要用加密方式aes-256-gcm的,ssr有协议和混淆

对于浏览器,要在switchy omega中配置
protocol选择SOCKS5 Server127.0.0.1 Port1080

【2】如何解决git clone没有返回的问题
配置git proxy
git config --global http.proxy 127.0.0.1:1080 为全局的git项目都设置代理
git config --local http.proxy 127.0.0.1"1080 为某个git项目设置单独代理

删除已有proxy
git config --global http.proxy 查询已有proxy
git config --global --unset http.proxy 取消设置

【3】手动修改host文件
打开/etc/hosts文件
手动往里面加github的ip地址
https://websites.ipaddress.com/www.github.com 这个是看github最新IP地址的网站

sudo vim /etc/hosts
source /etc/hosts
修改后编译:
source /etc/hosts

为了提高DNS 解析的记录,很多操作系统都会提供缓存DNS 记录的功能,但是,这可能会为测试DNS 服务或域名设定带来麻烦。为了测试出准确的结果,我们需要强制刷新本地 DNS 缓存记录。

1、Install first the nscd daemon with this command from the terminal:
sudo apt-get install nscd
Then clear your DNS data with this command:
sudo /etc/init.d/nscd restart
2、You can also try to flush DNS cache with this command:
sudo /etc/init.d/networking restart
3、Try also this command:
sudo /etc/init.d/dns-clean start

posted @ 2021-11-23 21:23  KinoLogic  阅读(314)  评论(1编辑  收藏  举报