menu Thinking Null
h5ai目录浏览-Firefox浏览器镜像搭建
2020-10-04   网络空间安全 Linux   暂无评论   1330 次阅读
由于服务器迁移,不幸地,镜像站已回归虚无

前言

看到 https://www.moerats.com/archives/555/H5ai修改版,带HTML5视频播放器DPlayer。赶紧迫不及待地整上。

早在2018年,我就试图搭建过h5ai,虽然页面显示出来了,但好多组件加载错误,文件下慢,php扩展未开启。

相关协议

时隔两年,再次整h5ai,这一次,是因为Google Play不能用,firefox官方源太慢,想建镜像方便下载。
根据MPL 协议。分发未修改过的firefox,只能是最新版,并保证用户能接收mozilla发布的更新。(distribution-policy)不管这么多了,反正我又是自己用。

h5ai安装

和其他网站程序不同,h5ai不在网站根目录,而是在_h5ai文件夹里。php里被禁用的一个 pcntl_async_signals()函数要启用。记得安装exec扩展。只要注意好这几点,就能安装成功。

简单配置一下用户名密码,差不多就安装好了。至于网页里有调用googleapis,但这个域名被墙了,那只能以后再换源了。毕竟只是前端字体问题。

获取Firefox

接下来就是去哪下载安装包呢?官网没有给出明显的提示,通过分析下载链接发现,下载来源就是 https://download-installer.cdn.mozilla.net/

Wget批量下载

让我们来了解以下wget命令的使用方法:

wget -r -np -nH --cut-dirs=3 -R index.html http://hostname/aaa/bbb/ccc/ddd/

Explanation:

It will download all files and subfolders in ddd directory
-r : recursively
-np : not going to upper directories, like ccc/…
-nH : not saving files to hostname folder
--cut-dirs=3 : but saving it to ddd by omitting first 3 folders aaa, bbb, ccc
-R index.html : excluding index.html files

Reference

所以就能得到特定版本的下载方法是:

wget -r -np -nH --cut-dirs=3 -R index.html -X /pub/mobile/releases/60.0.2/android-aarch64,/pub/mobile/releases/60.0.2/android-x86,/pub/mobile/releases/60.0.2/android-x86_64,/pub/mobile/releases/60.0.2/source,/pub/mobile/releases/60.0.2/android-api-16/en-US https://download-installer.cdn.mozilla.net/pub/mobile/releases/60.0.2/

desktop版本同理

wget -r -np -nH --cut-dirs=3 -R index.html -X /pub/firefox/releases/82.0b6/snap,/pub/firefox/releases/82.0b6/jsshell,/pub/firefox/releases/82.0b6/source,/pub/firefox/releases/82.0b6/update https://download-installer.cdn.mozilla.net/pub/firefox/releases/82.0b6/

最后,一个简陋,非自动化的镜像站就建成了
点此参观:https://ftp.awsl.tech/

结语

已经废弃

存档:https://web.archive.org/web/20201004100145/https://ftp.awsl.tech/

https://archive.vn/569XY#

本篇文章采用 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 许可协议进行许可。

转载或引用本文时请遵守许可协议,注明出处。

发表评论
暂无评论
textsms
account_circle
email
link