WebDAV server for AliyunDrive
Project description
aliyundrive-webdav
阿里云盘 WebDAV 服务,主要使用场景为配合支持 WebDAV 协议的客户端 App 如 Infuse、nPlayer 等实现在电视上直接观看云盘视频内容, 支持上传文件,但受限于 WebDAV 协议不支持文件秒传。
安装
可以从 GitHub Releases 页面下载预先构建的二进制包, 也可以使用 pip 从 PyPI 下载:
pip install aliyundrive-webdav
OpenWrt 路由器
GitHub Releases 中有预编译的 ipk 文件, 目前提供了 aarch64/arm/mipsel/x86_64/i686 等架构的版本,可以下载后使用 opkg 安装,比如
wget https://github.com/messense/aliyundrive-webdav/releases/download/v0.4.2/aliyundrive-webdav_0.4.2-1_aarch64_generic.ipk
wget https://github.com/messense/aliyundrive-webdav/releases/download/v0.4.2/luci-app-aliyundrive-webdav_0.4.2_all.ipk
wget https://github.com/messense/aliyundrive-webdav/releases/download/v0.4.2/luci-i18n-aliyundrive-webdav-zh-cn_0.4.2-1_all.ipk
opkg install aliyundrive-webdav_0.4.2-1_aarch64_generic.ipk
opkg install luci-app-aliyundrive-webdav_0.4.2_all.ipk
opkg install luci-i18n-aliyundrive-webdav-zh-cn_0.4.2-1_all.ipk
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='refresh token' messense/aliyundrive-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.2
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]
--host <host> Listen host [default: 0.0.0.0]
-p, --port <port> Listen 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
字段的值,如下图所示红色部分:
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
Built Distributions
Hashes for aliyundrive_webdav-0.4.2-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b4a7a715c164dc5840eb80a11bc3f87d66fc369624f2bff61fda473e649c6c7 |
|
MD5 | 6e998c3641171a10b0e930e26e236e29 |
|
BLAKE2b-256 | 507bfd30378bdea133607dc7b65eb62eeb2c22ae57cc1ecda0ae019f9b1fa075 |
Hashes for aliyundrive_webdav-0.4.2-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2c64edf8bed1418639a16bef4b51dcd23c13c587fe82bed0bf37333af51e464 |
|
MD5 | 484b2630f7c0dace881a2b41d55615d2 |
|
BLAKE2b-256 | e10c9fdf6808a61486997e8d2f087c2ae0769ebab303b733efb88dc7a9aa9fa0 |
Hashes for aliyundrive_webdav-0.4.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52dac358f544b4225aa6aa93f2046c0d6783a9bbfad4709271bb15569eebdd0c |
|
MD5 | 020d18d52121a5cbd85e5f923e460811 |
|
BLAKE2b-256 | 017b8386409d26a4dcb73f94518c6fd597189218efdc414a476f02f676e09cf8 |
Hashes for aliyundrive_webdav-0.4.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ed259d0950162a52df52704fa6c137d49cb168b43c85b711bedff6108d06ced |
|
MD5 | d9c6a05300ff4c1fd203295685e56028 |
|
BLAKE2b-256 | e6170ac04e6d5ff3bc2dd997f0cc80708da4ad3c1e338c9ddd33c10799206e91 |
Hashes for aliyundrive_webdav-0.4.2-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00238e4d81884af03c7f250d45062c1694e14a252bfef8327d30d3c10b8ebbde |
|
MD5 | 10a020e2b818a44cbf6ae3f2ca45af8f |
|
BLAKE2b-256 | b648022483e9fd5db26e26a60a5d07b56e0a1a1078a76ac956e58f5e076e3156 |
Hashes for aliyundrive_webdav-0.4.2-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ddeaa1bdacfcf67a81bb106fc41e1540f18b13ac9410f9efc9cfd9f203e8bf6 |
|
MD5 | 095f1b8ce7330284753fc3e2ce7012ad |
|
BLAKE2b-256 | 180899697834accc83a499663ca2edeb966dec2227899390f9b3ada189f1b2d0 |
Hashes for aliyundrive_webdav-0.4.2-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f76f3abed00b68615eed27c37da702a929f4578aa83e8a4859f4318d1db2684 |
|
MD5 | 3197d3c317e9c4ba8c0580ffd98bf492 |
|
BLAKE2b-256 | 908c1a34b6114e5a64413575692b7bcffb716b59901195a54c8cfec189dc40d8 |
Hashes for aliyundrive_webdav-0.4.2-py3-none-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26eedd9056ca44665cdd7fda4a648305fc390fb2a351d078a69f85e76741644c |
|
MD5 | acc99fb9a61f25ce9ca15cc6203dec84 |
|
BLAKE2b-256 | 054a0c11c86ba94fefc00165e9e89303484bb7b2a07312d0fc028d8e5b62a3c2 |