跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[分享创造] Alist 挂载 ipfs 驱动白嫖 ipfs 无限存储和流量

发表于

Alist 有一个名叫 IPFS API 的存储驱动,可以使用 ipfs 做存储。

安装 ipfs

ipfs-desktop

链接: https://docs.ipfs.tech/install/ipfs-desktop/

根据自己的操作系统选择下载的版本,一路安装后启动。

在打开的 webui 界面里面,进入文件,选择导入->新建文件夹 输入 alist ,这个 alist 你可以自定义名字。

docker-compose

docker-compose.yam

version: '3.8'
services:
  ipfs:
    image: ipfs/kubo
    restart: unless-stopped
    volumes:
      - ./ipfs:/data/ipfs
    environment:
      - IPFS_PATH=/data/ipfs
    ports:
      # p2p 通信端口
      - 4001:4001/tcp
      - 4001:4001/udp
      
      # API 端口
      - 127.0.0.1:5001:5001
      
      # HTTP 网关端口
      - 127.0.0.1:8080:8080

数据保存在当前的 ipfs 目录,p2p 通信使用 4001 端口,api 端口是 5001 ,http 网关端口是 8080 。要确保 API 端口和 alist 之间可以相互访问。

启动

docker-compose up -d

更多 ipfs 运行的方法请自行 Google 。

添加 IPFS API 驱动

进入 Alist 后台 存储->驱动,点击添加按钮,在下拉列表选择 IPFS API 。

挂载路径:输入 /alist ,注意需要使用 / 开头。ipfs webui 文件里面的路径,一般单独新建一个,例如 alist 。

根文件夹路径: /

Endpoint:http://127.0.0.1:5001 填写 ipfs API 的 ip 和端口,如果是局域网或者公网,需要看情况自定义。

网关: 如果你只是本地使用,可以填写 http://127.0.0.1:8080 ,或者使用如 https://cdn.ipfsscan.io 这样的公共网关。

点击添加即可。

优势

ipfs 底层会把相同文件只保存一份,减少空间占用,同时利用大量公共的 ipfs 网关,减少自己服务器的流量成本。

还有可以快速复制其它站点的内容,只需要把 cia 复制过来即可。

热门文件资源利用率很高,更少的存储空间,更快的加载速度。

缺点

冷门文件下载速度慢,大型文件开始速度慢。

样例: https://alist.ipfsscan.io/

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.