Skip to content

heartleo/webdav-115drive

Repository files navigation

webdav-115drive

webdav-115drive

一个 115 网盘 WebDAV 只读服务

Go Version Go Report GitHub Release Docker Pulls GitHub Downloads License

快速安装

Homebrew(macOS / Linux):

brew install heartleo/tap/webdav-115drive

curl(macOS / Linux):

curl -fsSL https://raw.githubusercontent.com/heartleo/webdav-115drive/main/install.sh | sh

Go install(需要 Go 1.25+):

go install github.com/heartleo/webdav-115drive/cmd/webdav-115drive@latest

源码编译:

git clone https://github.com/heartleo/webdav-115drive.git
cd webdav-115drive
go build -o webdav-115drive ./cmd/webdav-115drive

Docker:

docker run --rm -d \
  --name webdav-115drive \
  -p 8090:8090 \
  -e DRIVE_UID=115-uid \
  -e DRIVE_CID=115-cid \
  -e DRIVE_SEID=115-seid \
  -e DRIVE_KID=115-kid \
  ghcr.io/heartleo/webdav-115drive

Docker Compose:

services:
  webdav:
    container_name: webdav-115drive
    image: "ghcr.io/heartleo/webdav-115drive:latest"
    ports:
      - "8090:8090"
    env_file:
      - .env
    restart: unless-stopped
cat > .env <<EOF
DRIVE_UID=115-uid
DRIVE_CID=115-cid
DRIVE_SEID=115-seid
DRIVE_KID=115-kid
EOF

docker compose up -d

配置

使用 .env 文件

cp .env.example .env

使用 config.yaml

cp config.yaml.example config.yaml

运行

./webdav-115drive

交互式 TUI

webdav-115drive tui 启动只读的终端浏览器,复用 --configdrive.* 配置。

./webdav-115drive tui --config ./

按键:

按键 操作
/k/j 移动光标
PgUp / PgDn 翻页
g / G 跳到顶部 / 底部
/ l / 进入目录
/ h / 返回上级
/ 当前目录过滤
s 切换排序(名称 / 大小 / 修改时间)
i 文件信息弹窗
? 帮助
q / Ctrl+C 退出

TUI 仅支持浏览:不下载、不复制链接、不写入。

环境变量

变量名 说明 默认值 必填
SERVER_HOST 监听主机 0.0.0.0
SERVER_PORT 监听端口 8090
SERVER_PATH WebDAV 路径 /dav
SERVER_USER 用户名 user
SERVER_PASSWORD 密码 password
SERVER_LOG_LEVEL 日志级别 info
DRIVE_UID 115 Cookie UID -
DRIVE_CID 115 Cookie CID -
DRIVE_SEID 115 Cookie SEID -
DRIVE_KID 115 Cookie KID -
DRIVE_RATE API 请求速率(次/秒) 3
DRIVE_CACHE_EXPIRE 缓存过期时间(分钟) 1

获取 115 Cookies

  1. 登录 115.com
  2. 打开浏览器开发者工具(F12)
  3. 切换到 Application
  4. 找到 Cookieshttps://115.com
  5. 复制以下字段的值:
    • UIDDRIVE_UID
    • CIDDRIVE_CID
    • SEIDDRIVE_SEID
    • KIDDRIVE_KID

Star History

Star History Chart

Made with ❤️ by heartleo

Packages

 
 
 

Contributors

Languages