https://github.com/svtslv/webdav-cli
只需要一行即可开启属于自己的 WebDAV 服务器,基于 Node.js,可以跨平台运行。
#安装
npm install --global webdav-cli
#运行
npx webdav-cli
#命令行参数
' --path Path to folder [process.cwd()]',
' --host Host to use [127.0.0.1]',
' --port Port to use [1900]',
' --digest Enable digest authentication [basic]',
' --username Username for basic/digest authentication [random]',
' --password Password for basic/digest authentication [random]',
' --directory Show directory listings [false]',
' --autoIndex Display autoIndex [false]',
' --ssl Enable https [false]',
' --sslKey Path to ssl key file [self-signed]',
' --sslCert Path to ssl cert file [self-signed]',
' --help Print this list and exit',
' --version Print the version and exit.',
' --rights Comma separated values without spaces [all]', `
'all', 'canCreate', 'canDelete', 'canMove', 'canRename',
'canAppend', 'canWrite', 'canRead', 'canSource',
'canGetMimeType', 'canGetSize', 'canListLocks',
'canSetLock', 'canRemoveLock', 'canGetAvailableLocks',
'canGetLock', 'canAddChild', 'canRemoveChild',
'canGetChildren', 'canSetProperty', 'canGetProperty',
'canGetProperties', 'canRemoveProperty', 'canGetCreationDate',
'canGetLastModifiedDate', 'canGetWebName', 'canGetType'`,
'env:',
' WEBDAV_CLI_PATH, WEBDAV_CLI_HOST, WEBDAV_CLI_PORT,',
' WEBDAV_CLI_USERNAME, WEBDAV_CLI_PASSWORD, WEBDAV_CLI_DIGEST,',
' WEBDAV_CLI_SSL, WEBDAV_CLI_SSL_KEY, WEBDAV_CLI_SSL_CERT,',
' WEBDAV_CLI_DIRECTORY, WEBDAV_CLI_AUTO_INDEX, WEBDAV_CLI_RIGHTS',
' WEBDAV_CLI_DISABLE_AUTHENTICATION',