Skip to main content

FUSE for AliyunDrive

Project description

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.9/aliyundrive-fuse_0.1.9-1_aarch64_generic.ipk
wget https://github.com/messense/aliyundrive-fuse/releases/download/v0.1.9/luci-app-aliyundrive-fuse_0.1.9_all.ipk
wget https://github.com/messense/aliyundrive-fuse/releases/download/v0.1.9/luci-i18n-aliyundrive-fuse-zh-cn_0.1.9-1_all.ipk
opkg install aliyundrive-fuse_0.1.9-1_aarch64_generic.ipk
opkg install luci-app-aliyundrive-fuse_0.1.9_all.ipk
opkg install luci-i18n-aliyundrive-fuse-zh-cn_0.1.9-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
        --domain-id <DOMAIN_ID>                  Aliyun PDS domain id
    -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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aliyundrive_fuse-0.1.9.tar.gz (33.9 kB view details)

Uploaded Source

Built Distributions

aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_x86_64.whl (2.3 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ x86-64

aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_i686.whl (2.2 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ i686

aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_armv7l.whl (1.9 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARMv7l

aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_aarch64.whl (2.1 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARM64

aliyundrive_fuse-0.1.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

aliyundrive_fuse-0.1.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

aliyundrive_fuse-0.1.9-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.5+ x86-64

aliyundrive_fuse-0.1.9-py3-none-manylinux_2_5_i686.manylinux1_i686.whl (2.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.5+ i686

aliyundrive_fuse-0.1.9-py3-none-macosx_10_7_x86_64.whl (1.9 MB view details)

Uploaded Python 3 macOS 10.7+ x86-64

File details

Details for the file aliyundrive_fuse-0.1.9.tar.gz.

File metadata

  • Download URL: aliyundrive_fuse-0.1.9.tar.gz
  • Upload date:
  • Size: 33.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for aliyundrive_fuse-0.1.9.tar.gz
Algorithm Hash digest
SHA256 cf983cab6712f7342234398073926d9309ae136aa8bd08320de3d3c807597b72
MD5 d5697fb37d7519661a055522f0802122
BLAKE2b-256 3e729ca9cfc94ee4fabbb40a8d2ff068c22f3eb4090be4c4bd7a533966bac85b

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 36aa7d171a55137167937101c67b904ccf507ad898c6c432201bcfe5b0ce116c
MD5 c7cb4757e8e3ae2cd271b25db4d87ce8
BLAKE2b-256 5fa8b2e2a873e628c2dc92e3abb8203e0e753c17a2141d61eeb978829aeaf5ef

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 5f3b7d24ce4090be10d9f9bb4e0f051f68a5d7228e3170553a3eca1d6f50fcee
MD5 6d6d1c3c81204e6e65b6c55d7c2209d0
BLAKE2b-256 5e6fe4454a8e9a4983d4854f821c65027264709113bec63e40607f2fceaab591

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_armv7l.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 6fedb554b7c206f73f7efc61fb3721b074ed53e6e1d718984a5be8118fbe76b5
MD5 3f901d520e83c5b350554d1588ed4cc6
BLAKE2b-256 b32f86fe632abe1da0bd848132b61db109af2ae0466c4f8ec2810105b1dc890d

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 c45be07a05d4ddbd3c3cb9aec6182f1223eb5381237d5a99a54c50d5cb9493a4
MD5 ea29ea4aab8cfd1f01228ae9ac6cc153
BLAKE2b-256 24b1b68bcf911717bb6b9b04abcb0df873d8b0d55cd77fbd8dac1ac08187c4c8

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 4848a738515268bb4f3e833093b614bc15f5e77fb6cee05d4aa95053c99fd558
MD5 0566ca1f33047094c2c17faba38c83f7
BLAKE2b-256 f1fec8e50c1bba9df06b40382b67ded0d0599388d9c8a9921e3cabb6b18d0d0f

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 be12409ef296956e2968ced99ac12386f6e93b4347d479ba482f8aab8db19e07
MD5 a93490925a744c88dc8ee6f2e44e04c1
BLAKE2b-256 0804cd0826d1b2e64ed53a8c17165f2701beb43cb03a2bd57faf5230e5fd3ee2

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cf1b71f4ce9f65033318cd6994fd312f71be350f2545957beb68aa09b135fa2d
MD5 6911517898d7543eac9462efef9db0d6
BLAKE2b-256 7c433c34f98d2699c34c1efc0ca679d21b0b6ccf069af86eb1fa17afa920889f

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 053039570dbeb5a13ec19b339d64bcab2c5647cbbfc920ea315299fc31856fe2
MD5 c0d4c9df5b6dec1510c018b110885b2e
BLAKE2b-256 5b44a757ffcec4af46268fe27be5cf69a4ea1a0c97131f8d765b2e79c8c5324a

See more details on using hashes here.

File details

Details for the file aliyundrive_fuse-0.1.9-py3-none-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.9-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 0fdbb0dfc85c5e01f120d68b323fb132a6176fb600f8024ff12b5080cc7f713c
MD5 846284b3357e6778d6ec6e73fb820c22
BLAKE2b-256 fe81b9d4c4ee894b20c62c429cdb8f9892426bf33294e67179962daf74ba0f98

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page