WebDAV CLI - 一个简单开启 WebDAV 的命令行工具

安装:npm install --global webdav-cli

运行:npx webdav-cli [options]

Screen-Appinn2023-01-11 18.01.22

2 个赞

试过chfs 还有 docker装 ugeek webdav 以及 alist
最后最后…还是用nginx搭webdav :rofl:

我搭过好多次都没成功,因为默认安装的 NGINX 没带全扩展,编译又不想。

我也不是编译安装

sudo apt install nginx-full
1 个赞

要装node.js感觉有点奇怪~
随便搜搜,例如GitHub - hacdias/webdav: Simple Go WebDAV server. 就没有这个需要

类似搜索酱配置的网络同步服务,用这个没法自设cors。楼上的Golang WebDAV server更好

这个除了不支持cors之外都还不错,go的那个配置cors也比较残念,我看了源码才搞明白的,配置给有需要的分享一下

address: 0.0.0.0
port: 19001
auth: true
tls: false
prefix: /
debug: false

# Default user settings (will be merged)
scope: .
modify: true
rules: []

# CORS configuration
cors:
  enabled: true
  credentials: true
  allowed_hosts:
    - "*" # my local diffuse
  allowed_headers:
    - Depth
    - authorization
    - X-PINGOTHER
    - Content-Type
    - Range
    - Accept-Encoding
    - Origin
    - Host
    - Referer
  allowed_methods:
    - GET
    - PROPPATCH
    - PROPFIND
    - OPTIONS
  exposed_headers:
    - Content-Length
    - Content-Range
    - Allow
    - Content-Type
    - Origin

users:
  - username: admin
    password: admin
    scope: "E:\\webdav" # path