karadav/README.md

138 lines
6 KiB
Markdown
Raw Normal View History

2022-08-31 06:06:27 +00:00
# KaraDAV - A lightweight WebDAV server, with NextCloud compatibility
2022-09-03 03:08:52 +00:00
This is WebDAV server, allowing to easily set up a WebDAV file sharing server compatible with NextCloud clients with no depencies and high performance.
2022-08-31 06:06:27 +00:00
2022-09-03 03:08:52 +00:00
The only dependency is SQLite3 for the database.
2022-08-31 06:06:27 +00:00
Although this is a demo, this can be used as a simple but powerful file sharing server.
This server features:
2022-09-30 17:35:04 +00:00
* User-friendly directory listings for file browsing with a web browser:
* Upload directly from browser
* Rename
* Delete
* Create and edit text file
* MarkDown live preview
* Preview of images, text, MarkDown and PDF
2022-09-03 03:08:52 +00:00
* WebDAV class 1, 2, 3 support, support for Etags
2022-08-31 06:06:27 +00:00
* No database is required
* Multiple user accounts
* Share files for users using WebDAV: delete, create, update, mkdir, get, list
* Compatible with WebDAV clients
2022-09-04 00:27:40 +00:00
* Support for HTTP ranges (partial download)
2022-09-30 00:42:21 +00:00
* Support for [RFC 3230](https://greenbytes.de/tech/webdav/rfc3230.xhtml) to get the MD5 digest hash of a file (to check integrity) on `HEAD` requests (only MD5 is supported so far)
* Support for `Content-MD5` with `PUT` requests, see [dCache documentation for details](https://dcache.org/old/manuals/UserGuide-6.0/webdav.shtml#checksums)
* Support for some of the [Microsoft proprietary properties](https://greenbytes.de/tech/webdav/webdavfaq.html)
2022-09-30 17:35:04 +00:00
* Passes [Litmus compliance tests](https://github.com/tolsen/litmus) for basic, copymove, props
2022-08-31 06:06:27 +00:00
2022-09-04 00:27:40 +00:00
## NextCloud compatibility
* Android app
* Desktop app (tested on Debian)
* [NextCloud CLI client](https://docs.nextcloud.com/desktop/3.5/advancedusage.html)
* Support for [Direct download API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-api-overview.html#direct-download)
2022-09-30 13:17:47 +00:00
* Support for [Chunk upload](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/WebDAV/chunking.html)
2022-09-04 00:27:40 +00:00
2022-09-29 23:39:24 +00:00
## WebDAV clients compatibility
* [FUSE webdavfs](https://github.com/miquels/webdavfs) is recommended for Linux
* davfs2 is NOT recommended: it is very slow, and it is using a local cache, meaning changing a file locally may not be synced to the server for a few minutes, leading to things getting out of sync. If you have to use it, at least disable locks, by setting `use_locks=0` in the config.
2022-08-31 06:06:27 +00:00
## Future development
2022-09-03 03:08:52 +00:00
This might get supported in future (maybe):
2022-09-29 23:39:24 +00:00
* [Partial upload via PATCH](https://github.com/miquels/webdav-handler-rs/blob/master/doc/SABREDAV-partialupdate.md)
2022-09-04 00:27:40 +00:00
* [NextCloud Trashbin](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/WebDAV/trashbin.html)
* [NextCloud sharing](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-share-api.html) (maybe?)
2022-09-29 23:39:24 +00:00
* [WebDAV sharing](https://evertpot.com/webdav-caldav-carddav-sharing/)
2022-09-03 03:08:52 +00:00
* [Extended MKCOL](https://www.rfc-editor.org/rfc/rfc5689) if CalDAV support is implemented
2022-09-29 23:39:24 +00:00
* CalDAV/CardDAV support: maybe, [why not](https://evertpot.com/227/), we'll see, in the mean time see [Sabre/DAV](https://sabre.io/dav/) for that.
2022-08-31 06:06:27 +00:00
## Dependencies
This depends on the KD2\WebDAV and KD2\WebDAV_NextCloud classes from the [KD2FW package](https://fossil.kd2.org/kd2fw/), which are packaged in this repository.
2022-09-03 03:08:52 +00:00
They are lightweight and easy to use in your own software to add support for WebDAV and NextCloud clients to your software.
2022-08-31 06:06:27 +00:00
2022-09-30 17:35:04 +00:00
## Litmus compliance tests
```
-> running `basic':
0. init.................. pass
1. begin................. pass
2. options............... pass
3. put_get............... pass
4. put_get_utf8_segment.. pass
5. put_no_parent......... pass
6. mkcol_over_plain...... pass
7. delete................ pass
8. delete_null........... pass
9. delete_fragment....... pass
10. mkcol................. pass
11. mkcol_again........... pass
12. delete_coll........... pass
13. mkcol_no_parent....... pass
14. mkcol_with_body....... pass
15. finish................ pass
<- summary for `basic': of 16 tests run: 16 passed, 0 failed. 100.0%
-> running `copymove':
0. init.................. pass
1. begin................. pass
2. copy_init............. pass
3. copy_simple........... pass
4. copy_overwrite........ pass
5. copy_nodestcoll....... pass
6. copy_cleanup.......... pass
7. copy_coll............. pass
8. copy_shallow.......... pass
9. move.................. pass
10. move_coll............. pass
11. move_cleanup.......... pass
12. finish................ pass
<- summary for `copymove': of 13 tests run: 13 passed, 0 failed. 100.0%
-> running `props':
0. init.................. pass
1. begin................. pass
2. propfind_invalid...... pass
3. propfind_invalid2..... pass
4. propfind_d0........... pass
5. propinit.............. pass
6. propset............... pass
7. propget............... pass
8. propextended.......... pass
9. propmove.............. pass
10. propget............... pass
11. propdeletes........... pass
12. propget............... pass
13. propreplace........... pass
14. propget............... pass
15. propnullns............ pass
16. propget............... pass
17. prophighunicode....... pass
18. propget............... pass
19. propremoveset......... pass
20. propget............... pass
21. propsetremove......... pass
22. propget............... pass
23. propvalnspace......... pass
24. propwformed........... pass
25. propinit.............. pass
26. propmanyns............ pass
27. propget............... pass
28. propcleanup........... pass
29. finish................ pass
<- summary for `props': of 30 tests run: 30 passed, 0 failed. 100.0%
```
2022-08-31 06:06:27 +00:00
## Author
2022-09-03 03:08:52 +00:00
BohwaZ. Contact me on: IRC = bohwaz@irc.libera.chat / Mastodon = https://mamot.fr/@bohwaz / Twitter = @bohwaz
2022-08-31 06:06:27 +00:00
## License
This software and its dependencies are available in open source with the AGPL v3 license. This requires you to share all your source code if you include this in your software. This is voluntary.
For entities wishing to use this software or libraries in a project where you don't want to have to publish all your source code, we can also sell this software with a commercial license, contact me at bohwaz /at/ kd2 /dot/ org. We can do that as we have wrote and own 100% of the source code, dependencies included, there is no third-party code here.