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

Formatting Linux Root Filesystem as Xfs

warning Experimenting with filesystems can be very dangerous. You should understand the risks and back up data before trying the method below. The default filesystem used by debian is ext4, which is an old and stable filesystem. Recently I learn of an alternative filesystem xfs, which according to my experiment is faster than ext4. So I decided to give it a try. EXT4 Performance XFS Performance The problem is my server is a virtual private server and I don’t have physical access to it....

published on March 28, 2023 · 5 min · 1036 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

Writing a Forward Auth for ttyd

Background ttyd is a simple tool for sharing terminal over the web. It can be used in place of ssh clients to manage remote servers as it only requires the presence of a browser with internet connectivity. It can be used with a variety of commands ranging from showing the output of top command to fully interactive bash session. However, ttyd itself only supports basic auth and auth proxy. In basic auth mode, ttyd authenticates requests from a predefined list of users....

published on February 28, 2023 · last edited on April 21, 2023 · 5 min · 940 words