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.13/aliyundrive-fuse_0.1.13-1_aarch64_generic.ipk
wget https://github.com/messense/aliyundrive-fuse/releases/download/v0.1.13/luci-app-aliyundrive-fuse_0.1.13_all.ipk
wget https://github.com/messense/aliyundrive-fuse/releases/download/v0.1.13/luci-i18n-aliyundrive-fuse-zh-cn_0.1.13-1_all.ipk
opkg install aliyundrive-fuse_0.1.13-1_aarch64_generic.ipk
opkg install luci-app-aliyundrive-fuse_0.1.13_all.ipk
opkg install luci-i18n-aliyundrive-fuse-zh-cn_0.1.13-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.13.tar.gz (34.5 kB view details)

Uploaded Source

Built Distributions

aliyundrive_fuse-0.1.13-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.13-py3-none-musllinux_1_1_i686.whl (2.3 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ i686

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

Uploaded Python 3 musllinux: musl 1.1+ ARMv7l

aliyundrive_fuse-0.1.13-py3-none-musllinux_1_1_aarch64.whl (2.2 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARM64

aliyundrive_fuse-0.1.13-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.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

aliyundrive_fuse-0.1.13-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.13-py3-none-manylinux_2_5_i686.manylinux1_i686.whl (2.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.5+ i686

aliyundrive_fuse-0.1.13-py3-none-macosx_10_7_x86_64.whl (2.0 MB view details)

Uploaded Python 3 macOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: aliyundrive_fuse-0.1.13.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for aliyundrive_fuse-0.1.13.tar.gz
Algorithm Hash digest
SHA256 61392be19a923f0e231bba47c1e17a3be4e2f16b6e69759341ef228a87ebe789
MD5 489d5fb922a2c7f9ae0abe0f34624959
BLAKE2b-256 9eb6c0624ba4943fd2bfd4172375b14581810ad8129774d7c57f12ecee5dbbe3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 e453b52edf3e8a15ed6a8d8e38ba9806edd17bdd6401bd46647d1c7b1454fe23
MD5 e699b2d1b297d9b39b242ccc4ec578d7
BLAKE2b-256 2f5f9898e8f78163a9f344979c2662673caede4f3d51a69ac5214f02245f5fb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 31431b3a9f820162bf36063cc0dc0dd66d231b63a4637f1a7c2680e01e68441e
MD5 1152f675290b653dad761ed39b97b9a1
BLAKE2b-256 8bb8612e957bd12f3a505ee6f20656ab614cceaf0e85ff334abc9c2c5463de50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 9c8b0a4fc71499ba02dc08c5f64f8ebfb3d1a4da78d7c54bbbab4b9a9580cd4d
MD5 595b54379d4ceafdf21686695ff1219e
BLAKE2b-256 fe20fc691cc613a8ee3174e51eff8e6c8d25bd32f9c445f43ff1b9c1ba74d6cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 dfb1924cf53f144eabc6b9966725a5c8c5dda3b21be1e6cec26cb7e3ca35aff1
MD5 2b0bb9291f93a8096299e49c29b0cebf
BLAKE2b-256 6641d721bbf6552786dd125b666850ca1ee2a195382c6d817d1c1d27f3ec63b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 222088848b87b7245ee4408b326860d638a6ff34ef25a8ed3cc940ddc0b81a05
MD5 ad7ae6032c572e06a3deb9a4caba6ac0
BLAKE2b-256 83511d2b8dc13af9cc9fe34efb7fb76bcf0183dedc65ffdaa345495f26bdc515

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c76047b89ba8fc7293e8b3a158ad97b8db614459cec968e754e650de03368c5a
MD5 e4c2a1b3f665d015932c668a9874b5cb
BLAKE2b-256 4700a33b1bec9930de3516541f8a8e368dfbab2bada57233ddf047e1bc550af8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6f431b3a9ad2e1dc3a0e691dfba89a2eed0639ed96744182f47cdb84e9ed8b1b
MD5 b27ec6b5817c963364154550ee8c6a20
BLAKE2b-256 70c890677cd9d70e31f34645249430833400ec0af797b93c0d670302cf0950cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 53ec38b79965aa3497eb3156cd51b2c38d15f3a734a847a5457968044054bebe
MD5 a01912e9f1d6bf7c2943f58b9bddb467
BLAKE2b-256 24b16992a13f86c8d22ccb935ee3fd648e416d6518f65dbb65d09dc8305561d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aliyundrive_fuse-0.1.13-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 1c1507c21e90e807b6c4b2953357ed324d0e9fb3d44031d8d794c0e344ecd8ce
MD5 9dbb5f9ee857e57cbd7491d86a262fd6
BLAKE2b-256 8ca94e263039df8a9d722b10129e92ceaec453646cc745ad7d0f3667f8090a90

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