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.3.2/aliyundrive-webdav_0.3.2-1_aarch64_generic.ipk
wget https://github.com/messense/aliyundrive-webdav/releases/download/v0.3.2/luci-app-aliyundrive-webdav_0.3.2_all.ipk
wget https://github.com/messense/aliyundrive-webdav/releases/download/v0.3.2/luci-i18n-aliyundrive-webdav-zh-cn_0.3.2-1_all.ipk
opkg install aliyundrive-webdav_0.3.2-1_aarch64_generic.ipk
opkg install luci-app-aliyundrive-webdav_0.3.2_all.ipk
opkg install luci-i18n-aliyundrive-webdav-zh-cn_0.3.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.3.2
USAGE:
aliyundrive-webdav [FLAGS] [OPTIONS] --refresh-token <refresh-token>
FLAGS:
-I, --auto-index Automatically generate index.html
-h, --help Prints help information
-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.3.2-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86c2d22aa0c17052e714741258862665e3ccfd15dbe9fba42aaf6677b0891a67 |
|
MD5 | aa10c0b19c2ab1f2c64030f5af09e9e5 |
|
BLAKE2b-256 | 0bc9b69ef05b50209f1396cbeaf9d8fbb7035072bebf652d1e4da8d0b3760482 |
Hashes for aliyundrive_webdav-0.3.2-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8378b03e932e0f138b4ffd6977a50911fc9623a0d5392497c35a3ed7fe381df2 |
|
MD5 | 6ced43dd0f74cab3af9e303bd1f8bbce |
|
BLAKE2b-256 | c6995797bfd4c5c805148fd9adfba323dd35ff12850cfd7f3fbc62f97d81f512 |
Hashes for aliyundrive_webdav-0.3.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0606f66495ac3a5327d6fd9eabd7900d9e59fe7e95e84fb4549efd2e1c4b4d40 |
|
MD5 | 6098cfc72d7f6acc3ba50421dbc1d344 |
|
BLAKE2b-256 | 5cf6afe1a9e0aa7edab7c10c57a7080f2033741d9bb2c0b06c571dce5685a60a |
Hashes for aliyundrive_webdav-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc886ab9557bee5bdd9e6b063c26d90ee9dadc33a6bf09bd368ca3affaf001b4 |
|
MD5 | 51aae06c43765245d6181ef252d9dd77 |
|
BLAKE2b-256 | 49405e0a900a0c9b3014d6636d3aa836db1c6ffc9aa32d26532621d563f2977e |
Hashes for aliyundrive_webdav-0.3.2-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4d503172f49cf69b96f6758d41c8d552833871efc219b0f28d2627279cd3554 |
|
MD5 | 30ea79e42fe42fc454a770bbfc924d2e |
|
BLAKE2b-256 | 77149ec422ccb333a822f718899be202bf15f290a4dbea55187fd04966f53e42 |
Hashes for aliyundrive_webdav-0.3.2-py3-none-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f43860ce94248057d03834648599066acd45be9d7442f5a71a0b47e773b2414f |
|
MD5 | b228c37611576985d844b38a018882d8 |
|
BLAKE2b-256 | 79713a7fd0d9fe32dac55788b5a718957531126a3d347ab786b8b379f0b76735 |
Hashes for aliyundrive_webdav-0.3.2-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8336a67dbac2154573e035abb66794afb5f69882aa15878cdd1b003eae2b6443 |
|
MD5 | 79ad7300a2709490f73b5f02c4c9ed76 |
|
BLAKE2b-256 | 6901aca3eefbda8aa227d0b56ea5879373dd4c286872f83a0cf912b0567bf988 |
Hashes for aliyundrive_webdav-0.3.2-py3-none-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d53d9b6891711de2cb23896c94a471fbb0f37c7c0af02ab0c99d3bd08cbe1a8e |
|
MD5 | ef05bb36b0faa386769f4fd8cbfa7b9a |
|
BLAKE2b-256 | d5010caa83fe32dd6809aa3b45d1a299eeb63235e37cd0ee9fe3b646cb6ae02a |