网站首页 > 文章精选 正文
Archlinux 系安装 AUR 中软件经常遇到 github 下载包和文件连接不上,即使连上速度也很感人。好在有 github 文件下载代理站,能不能利用上,为下载速度加加油!
yay 可行。
下载代理要求
下载代理能使用“代理域名 + / + github 文件”的地址下载,如:
# 代理域名:https://file_down.com
# 需下载的 github 文件:https://github.com/123/456/789.zip
# 测试能在浏览器使用如下地址成功下载
https://file_down.com/https://github.com/123/456/789.zip
修改 yay 配置文件
备份配置文件
sudo cp /etc/makepkg.conf /etc/makepkg.conf.bak
编辑配置文件
sudo nano /etc/makepkg.conf
找到配置文件中
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
修改如下:
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
# 'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/home/iseeisayc/ibin/github_makepkg %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
注释 https 行,添加 自己的 github_makepkg 脚本
github_makepkg:脚本名,/home/iseeisayc/ibin/:脚本路径
github_makepkg 脚本
#! /bin/bash
# 代理网站,域名后加 / ,以 https://file_down.com 为例
# 更换代理网站,只需修改此处即可
isproxy='https://file_down.com/'
isgithub=`echo $2 | cut -f3 -d'/'`;
isfile=`echo $2`;
case "$isgithub" in
"github.com")
isurl=$isproxy$isfile;
;;
*)
isurl=$2;
;;
esac
echo "download from $isurl";
/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o $1 $isurl;
给 github_makepkg 脚本赋权
chmod +x ~/ibin/github_makepkg
安装 ttf-wps-fonts 试试
yay -S ttf-wps-fonts
跟之前相比,已经起飞了!
关注 Linux 应用,欢迎点赞、评论、收藏、交流,谢谢!
猜你喜欢
- 2024-12-29 快速访问GitHub方法 如何快速访问github
- 2024-12-29 解决Github访问慢问题,加速你的Github!Github访问加速工具
- 2024-12-29 提升 GitHub 的访问速度 国内访问github速度缓慢
- 2024-12-29 Mac安装brew,解决raw.githubusercontent.com无法访问的问题
- 2024-12-29 GitHub惊爆史无前例大宕机!技术巨头竟也脆弱如斯?
- 2024-12-29 一招搞定 GitHub 访问、下载加速 如何提高github下载速度
- 2024-12-29 一款C#开源的、跨平台的GitHub加速神器&Steam工具箱
- 2024-12-29 GitHub 网站难访问?告诉你一个镜像站吧
- 2024-12-29 Github访问速度慢的解决方案总汇 github 访问速度慢,图片无法加载?一劳永逸的解决方法
- 2024-12-29 程序员小白-如何访问github 如何访问github上的web项目
- 最近发表
- 标签列表
-
- newcoder (56)
- 字符串的长度是指 (45)
- drawcontours()参数说明 (60)
- unsignedshortint (59)
- postman并发请求 (47)
- python列表删除 (50)
- 左程云什么水平 (56)
- 计算机网络的拓扑结构是指() (45)
- 稳压管的稳压区是工作在什么区 (45)
- 编程题 (64)
- postgresql默认端口 (66)
- 数据库的概念模型独立于 (48)
- 产生系统死锁的原因可能是由于 (51)
- 数据库中只存放视图的 (62)
- 在vi中退出不保存的命令是 (53)
- 哪个命令可以将普通用户转换成超级用户 (49)
- noscript标签的作用 (48)
- 联合利华网申 (49)
- swagger和postman (46)
- 结构化程序设计主要强调 (53)
- 172.1 (57)
- apipostwebsocket (47)
- 唯品会后台 (61)
- 简历助手 (56)
- offshow (61)