Implementing A Multi-User Webdav Server

Golang comes with a webdav server implementation. It only supports webdav operations and nothing more. To manager a group of users, we need to implement our own handling logic. hacdias’s webdav server associates each user with his/her own webdav.Handler, and each authenticated request goes to their respective handler. rclone can generate dynamic webdav backends using auth proxy. By implementing auth proxy, rclone can serve different contents based on users. However, both of them suffer from lock states not shared, meaning when multiple users share the same directory, some changes may be lost if they try to modify its resources concurrently....

published on May 29, 2023 · 3 min · 621 words

Adding Checksums to Golang Webdav Server Part II

Continuing from previous post, this part deal with how to integrate rclone handling to an actual webdav server. What Previous Post didn’t Do? Previous post deals with how rclone interacts with OwnCloud and NextCloud webdav servers and the implementation of custom webdav filesystems. It doesn’t cover how to extract the relevant headers and write these information to checksum files. The Problem with Golang Webdav Handler Golang webdav handler can only be customized by implementing custom LockSystem and FileSystem....

published on April 9, 2023 · last edited on April 21, 2023 · 3 min · 577 words

Adding Checksums to Golang Webdav Server Part I

Golang x/net has an implementation of WebDAV protocol, which can be used as a backend for Rclone. Rclone can be used to manage files on various storage systems, be it local or on cloud. Using WebDAV with Rclone, we can sync local files with files stored on remote server. However, vanilla golang webdav server doesn’t support checksum, meaning rclone will only use file size to determine if file has changed. In some situations, rclone won’t be able to pick up local filesystem changes, resulting in data discrepancy....

published on March 9, 2023 · last edited on April 26, 2023 · 4 min · 793 words