Skip to main content

WebDAV server for AliyunDrive

Project description

aliyundrive-webdav

GitHub Actions PyPI Docker Image

阿里云盘 WebDAV 服务,主要使用场景为配合支持 WebDAV 协议的客户端 App 如 InfusenPlayer 等实现在电视上直接观看云盘视频内容, 支持上传文件,但受限于 WebDAV 协议不支持文件秒传。

安装

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

pip install aliyundrive-webdav

OpenWrt 路由器

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

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

其它 CPU 架构的路由器可在 GitHub Releases 页面中查找对应的架构的主程序 ipk 文件下载安装, 常见 OpenWrt 路由器 CPU 架构如下表(欢迎补充):

路由器 CPU 架构
nanopi r4s aarch64_generic
小米 AX3600 aarch64_cortex-a53
斐讯 N1 盒子 aarch64_cortex-a53
Newifi D2 mipsel_24kc
Pogoplug arm_mpcore

OpenWrt 配置界面

Koolshare 梅林固件

GitHub Releases 中有预编译包 aliyundrivewebdav-merlin-arm*.tar.gz , 目前提供了旧的 arm380 和兼容 arm384/386 固件的版本,可在下载后在软件中心离线安装。

梅林配置界面

Docker 运行

docker run -d --name=aliyundrive-webdav --restart=unless-stopped -p 8080:8080 \
  -v /etc/aliyundrive-webdav/:/etc/aliyundrive-webdav/ \
  -e REFRESH_TOKEN='your refresh token' \
  -e WEBDAV_AUTH_USER=admin \
  -e WEBDAV_AUTH_PASSWORD=admin \
  messense/aliyundrive-webdav

其中,REFRESH_TOKEN 环境变量为你的阿里云盘 refresh_tokenWEBDAV_AUTH_USERWEBDAV_AUTH_PASSWORD 为连接 WebDAV 服务的用户名和密码。

QNAP 威联通 NAS

管理员登陆 NAS 后安装 ContainerStation 并启动服务,在 Management (管理) 标签中 Create Application (新建应用),配置如下

version: '3.3'
services:
  aliyundrive-webdav:
    container_name: aliyundrive-webdav
    restart: unless-stopped
    ports:
      - '8080:8080'
    environment:
      - 'REFRESH_TOKEN=mytoken...'
    image: messense/aliyundrive-webdav

其中 REFRESH_TOKEN 文档最下面说明;:8080 网盘访问映射端口,可以按需改为其他的。

点击 Create (创建)后启动,访问 http://nas地址:8080/ 即可看到你网盘的自动生成索引网页文件。

参考文档

命令行用法

$ aliyundrive-webdav --help
aliyundrive-webdav 0.4.8

USAGE:
    aliyundrive-webdav [FLAGS] [OPTIONS] --refresh-token <refresh-token>

FLAGS:
    -I, --auto-index    Automatically generate index.html
    -h, --help          Prints help information
        --no-trash      Delete file permanently instead of trashing it
    -V, --version       Prints version information

OPTIONS:
    -W, --auth-password <auth-password>          WebDAV authentication password [env: WEBDAV_AUTH_PASSWORD=]
    -U, --auth-user <auth-user>                  WebDAV authentication username [env: WEBDAV_AUTH_USER=]
        --cache-size <cache-size>                Directory entries cache size [default: 1000]
        --cache-ttl <cache-ttl>                  Directory entries cache expiration time in seconds [default: 600]
        --host <host>                            Listen host [env: HOST=]  [default: 0.0.0.0]
    -p, --port <port>                            Listen port [env: PORT=]  [default: 8080]
    -S, --read-buffer-size <read-buffer-size>
            Read/download buffer size in bytes, defaults to 10MB [default: 10485760]

    -r, --refresh-token <refresh-token>          Aliyun drive refresh token [env: REFRESH_TOKEN=]
        --root <root>                            Root directory path [default: /]
    -w, --workdir <workdir>                      Working directory, refresh_token will be stored in there if specified

获取 refresh_token

登录阿里云盘后,可以在开发者工具 -> Application -> Local Storage 中的 token 字段中找到。
注意:不是复制整段 JSON 值,而是 JSON 里 refresh_token 字段的值,如下图所示红色部分:

refresh token

License

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

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

aliyundrive_webdav-0.4.8.tar.gz (629.7 kB view details)

Uploaded Source

Built Distributions

aliyundrive_webdav-0.4.8-py3-none-win_amd64.whl (2.5 MB view details)

Uploaded Python 3 Windows x86-64

aliyundrive_webdav-0.4.8-py3-none-win32.whl (2.3 MB view details)

Uploaded Python 3 Windows x86

aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_x86_64.whl (2.9 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ x86-64

aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_i686.whl (2.7 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ i686

aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_armv7l.whl (2.3 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARMv7l

aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_aarch64.whl (2.6 MB view details)

Uploaded Python 3 musllinux: musl 1.1+ ARM64

aliyundrive_webdav-0.4.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.3 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARMv7l

aliyundrive_webdav-0.4.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

aliyundrive_webdav-0.4.8-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.5+ x86-64

aliyundrive_webdav-0.4.8-py3-none-manylinux_2_5_i686.manylinux1_i686.whl (2.7 MB view details)

Uploaded Python 3 manylinux: glibc 2.5+ i686

aliyundrive_webdav-0.4.8-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (4.8 MB view details)

Uploaded Python 3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

aliyundrive_webdav-0.4.8-py3-none-macosx_10_7_x86_64.whl (2.5 MB view details)

Uploaded Python 3 macOS 10.7+ x86-64

File details

Details for the file aliyundrive_webdav-0.4.8.tar.gz.

File metadata

  • Download URL: aliyundrive_webdav-0.4.8.tar.gz
  • Upload date:
  • Size: 629.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aliyundrive_webdav-0.4.8.tar.gz
Algorithm Hash digest
SHA256 24c03fce8e5aa61f56bc6cec80d7a05ed9e30504d99396200af4e5303fe3bede
MD5 5bab20d62df421b8697d17cb437cd099
BLAKE2b-256 f861e65d16bc906cc39107c55ce836a5f427bb4ab3f393eb290b07bf8b490d2c

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-win_amd64.whl.

File metadata

  • Download URL: aliyundrive_webdav-0.4.8-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e4b7279ab1d51c10371d84a3101fbe99d7d0b142797f7e063da81c8f6739e09a
MD5 8a014012c5ab7979ebfee2bb92072476
BLAKE2b-256 4793857959e8a0526726d3929a1eee2184ced331947417fea529ed3acf2323cd

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-win32.whl.

File metadata

  • Download URL: aliyundrive_webdav-0.4.8-py3-none-win32.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-win32.whl
Algorithm Hash digest
SHA256 aa4aa6b7a55af85835a91870afeba37261a55fdf415577ce2447f49dc0f5ec68
MD5 c373abaa54c2c4b9db2ce64d33c806f8
BLAKE2b-256 9537873cb3d724d6d8c1d6d7f4cb1c2e4e45e2782ad956719f7ac8e6c532b403

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_x86_64.whl.

File metadata

  • Download URL: aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3, musllinux: musl 1.1+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 59029f2a79adb8339928fcdbcfbe397f1889b9e5c7d5c8027cf7dd16bd7e454e
MD5 dcedb476177836aee5af80cad9f94af3
BLAKE2b-256 356f6fef7f873eac6a564dfdfdf88d3c9eb6695101a42462076b18ba0f836d17

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_i686.whl.

File metadata

  • Download URL: aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_i686.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3, musllinux: musl 1.1+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 0c2dac843598ee830d4164da9aa05b7acaa020bd1705e61e81abd3f1fadc931b
MD5 97251d5210de800a0d3e8804df402339
BLAKE2b-256 ad25d7d2d6ecf1cab7f11edac097d92903837da4cf1d3a5bd81ec44e7fac26bf

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_armv7l.whl.

File metadata

  • Download URL: aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_armv7l.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, musllinux: musl 1.1+ ARMv7l
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_armv7l.whl
Algorithm Hash digest
SHA256 ca9d333a399b0164afb9572a217c828bb9ff069168ee5a2f8467134dbdd87abc
MD5 f10d99bceccda4a342d281b015d97467
BLAKE2b-256 14eedcf9e738dbaf6a5fd0152180df3144857411e235b5671d79825c1fc58aa5

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_aarch64.whl.

File metadata

  • Download URL: aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_aarch64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: Python 3, musllinux: musl 1.1+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 63467a983e5b93c1d36f3ebc0a0ef7f1d509fbeeb87121afad8e84cffc6db889
MD5 d65c0fa2213e0310fb4e2d3cf127b2a6
BLAKE2b-256 1f91466a07175f21f8cbdb2c5c3a0bd7e36f9ec545375a7b5e504cfc391afdb0

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8235ee2aff4e86c630f8be2bcadd288783c9295f4db8fe36a7292a26662a4a4d
MD5 6befeb168795a7aad0bb21be49f09b8b
BLAKE2b-256 c5b8d039dbcd2f1c1f635c5067b9dd49d3e3163fcbad6212aa7666411330968c

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 73ae0c5c6e1bddab1d925b10c3f93108775379f937ae03b0e2e464f60467c756
MD5 fa97ead0bd1efca2712578bafd9e656a
BLAKE2b-256 734b0f4e76ff9cf1b5a20a085112674d323db752d56f87e8703aa06b812af76c

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e0722642c810be95606fa1ec408a39ed79dda234e3b7a5663574b60660e22a17
MD5 09e7e4398efa2635ff72410e9b01a7aa
BLAKE2b-256 f18be6cea66a8d02015021ae33d647626c08fad9799df5d77144319ac90909d6

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 7e5027ca04092e2b90f0c3a69bbdb42b61dfd12ee07db39f196cb3313127490b
MD5 643a25d9393a48b96a545d3b33295eb0
BLAKE2b-256 a845d8e00f391737f6406c944673d9675c6167b65685d06afa6c89c0be38c6b7

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 96adac2a3323625c512b86eb53a4ba906c58f2597abd2de4f73aa18259bbb08b
MD5 60aad35b7375405bfc47af0159e08425
BLAKE2b-256 5011b2b547fc99e62becefa4ec23f864379c98103ddaee911b3550faf942564f

See more details on using hashes here.

File details

Details for the file aliyundrive_webdav-0.4.8-py3-none-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: aliyundrive_webdav-0.4.8-py3-none-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for aliyundrive_webdav-0.4.8-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 1f6a1952970cd957f2de393bf0451849d43ac58703430e55c30a3f93b86b4815
MD5 38aa5be8be6dd4773c52c2dd36728708
BLAKE2b-256 76b3c25a5b394ed32c99134fa77f7544b502d262950098b545f46981e22f2925

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