Giter Site home page Giter Site logo

huiguyy / aliyundrive-fuse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from messense/aliyundrive-fuse

0.0 0.0 0.0 149 KB

阿里云盘 FUSE 磁盘挂载

License: MIT License

Shell 3.84% Lua 7.35% Rust 78.86% Makefile 5.75% HTML 2.93% Dockerfile 1.27%

aliyundrive-fuse's Introduction

aliyundrive-fuse

GitHub Actions PyPI Docker Image aliyundrive-fuse Crates.io

🚀 Help me to become a full-time open-source developer by sponsoring me on GitHub

阿里云盘 FUSE 磁盘挂载,主要用于配合 Emby 或者 Jellyfin 观看阿里云盘内容,功能特性:

  1. 目前只读,不支持写入
  2. 支持 Linux 和 macOS,暂不支持 Windows

aliyundrive-webdav 项目已经实现了通过 WebDAV 访问阿里云盘内容,但由于 Emby 和 Jellyfin 都不支持直接访问 WebDAV 资源, 需要配合 rclone 之类的软件将 WebDAV 挂载为本地磁盘,而本项目则直接通过 FUSE 实现将阿里云盘挂载为本地磁盘,省去使用 rclone 再做一层中转。

安装

  • macOS 需要先安装 macfuse
  • Linux 需要先安装 fuse
    • Debian 系如 Ubuntu: apt-get install -y fuse3
    • RedHat 系如 CentOS: yum install -y fuse3

可以从 GitHub Releases 页面下载预先构建的二进制包, 也可以使用 pip 从 PyPI 下载:

pip install aliyundrive-fuse

如果系统支持 Snapcraft 比如 Ubuntu、Debian 等,也可以使用 snap 安装:

sudo snap install aliyundrive-fuse

OpenWrt 路由器

GitHub Releases 中有预编译的 ipk 文件, 目前提供了 aarch64/arm/x86_64/i686 等架构的版本,可以下载后使用 opkg 安装,以 nanopi r4s 为例:

wget https://github.com/messense/aliyundrive-fuse/releases/download/v0.1.14/aliyundrive-fuse_0.1.14-1_aarch64_generic.ipk
wget https://github.com/messense/aliyundrive-fuse/releases/download/v0.1.14/luci-app-aliyundrive-fuse_0.1.14_all.ipk
wget https://github.com/messense/aliyundrive-fuse/releases/download/v0.1.14/luci-i18n-aliyundrive-fuse-zh-cn_0.1.14-1_all.ipk
opkg install aliyundrive-fuse_0.1.14-1_aarch64_generic.ipk
opkg install luci-app-aliyundrive-fuse_0.1.14_all.ipk
opkg install luci-i18n-aliyundrive-fuse-zh-cn_0.1.14-1_all.ipk

其它 CPU 架构的路由器可在 GitHub Releases 页面中查找对应的架构的主程序 ipk 文件下载安装。

Tips: 不清楚 CPU 架构类型可通过运行 opkg print-architecture 命令查询。

命令行用法

USAGE:
    aliyundrive-fuse [OPTIONS] --refresh-token <REFRESH_TOKEN> <PATH>

ARGS:
    <PATH>    Mount point

OPTIONS:
        --allow-other                            Allow other users to access the drive
    -h, --help                                   Print help information
    -r, --refresh-token <REFRESH_TOKEN>          Aliyun drive refresh token [env: REFRESH_TOKEN=]
    -S, --read-buffer-size <READ_BUFFER_SIZE>    Read/download buffer size in bytes, defaults to 10MB [default: 10485760]
    -V, --version                                Print version information
    -w, --workdir <WORKDIR>                      Working directory, refresh_token will be stored in there if specified

比如将磁盘挂载到 /mnt/aliyundrive 目录:

mkdir -p /mnt/aliyundrive /var/run/aliyundrive-fuse
aliyundrive-fuse -r your-refresh-token -w /var/run/aliyundrive-fuse /mnt/aliyundrive

Emby/Jellyfin

如果是直接运行在系统上的 Emby/Jellyfin,则可以直接在其控制台添加媒体库的时候选择阿里云盘对应的挂载路径中的文件夹即可; 如果是 Docker 运行的 Emby/Jellyfin,则需要将阿里云盘挂载路径也挂载到 Docker 容器中,假设阿里云盘挂载路径为 /mnt/aliyundrive, 以 Jellyfin 为例(假设 Jellyfin 工作路径为 /root/jellyfin)将云盘挂载到容器 /media 路径:

docker run -d --name jellyfin \
  -v /root/jellyfin/config:/config \
  -v /root/jellyfin/cache:/cache \
  -v /mnt/aliyundrive:/media \
  -p 8096:8096 \
  --device=/dev/dri/renderD128 \
  --device /dev/dri/card0:/dev/dri/card0 \
  --restart unless-stopped \
  jellyfin/jellyfin

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.

aliyundrive-fuse's People

Contributors

messense avatar beginner-go avatar wqyjh avatar tominescu avatar chunfengyao avatar jjm2473 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.