ipfs-webdav

Crates.ioipfs-webdav
lib.rsipfs-webdav
version0.2.0
sourcesrc
created_at2022-10-07 19:54:24.586491
updated_at2023-11-09 17:55:56.364822
descriptionA WebDAV server that enables direct access to IPFS MFS as a mounted drive
homepagehttps://debox.network/ipfs-webdav
repositoryhttps://github.com/debox-network/ipfs-webdav
max_upload_size
id683051
size255,505
Pavel Denisov (denisovpi)

documentation

README

ipfs-webdav

ipfs-webdav is a WebDAV server that enables direct access to IPFS's MFS as a mounted drive. It enables users to interface with the MFS directly through a file explorer or terminal.

Even though IPFS currently offers the ability to mount an IPFS file system, it is still experimental and limited to read-only access. ipfs-webdav offers a convenient way for read/write access to the files stored on your local IPFS node without having to interact with IPFS, either through the web-ui or cli.

ipfs-webdav architecture

Installation

Before installing ipfs-webdav make sure that the following dependencies are installed:

Once all the dependencies are installed, refer to the follow steps to install ipfs-webdav:

  1. Clone the git repo: git clone https://github.com/debox-network/ipfs-webdav
  2. Navigate to repo root: cd ipfs-webdav
  3. Assemble the project cargo build --package ipfs-webdav --example base --release

Running ipfs-webdav

Once ipfs-webdav is installed on your system, run the project:

  1. Launch an IPFS daemon in a terminal: ipfs daemon
  2. In another terminal run ipfs-webdav: cd target/release/examples && ./base

Mounting

Once both the IPFS daemon and ipfs-webdav daemon are running, the WebDAV filesystem can be mounted for immediate use. The mounting instructions differ slightly based on your OS. Refer to the appropriate set of instructions below.

Linux - via files explorer

  1. Open up the default files explorer (usually gnome-files/nautilus)
  2. Navigate to + Other Locations on the bottom of the left panel
  3. Enter dav://127.0.0.1:4918 on the bottom bar where the Enter server address... prompt is
  4. The mounted filesystem should appear in the left panel as: 127.0.0.1:4918

Linux - via CLI (Debian/Ubuntu based distros)

  1. Install davfs2 package: sudo apt-get install davfs2
  2. Create the mountpoint directory: sudo mkdir /mnt/dav
  3. Mount the WebDAV share: sudo mount -t davfs http://127.0.0.1:4918 /mnt/dav

Windows

TBD

MacOS

TBD

Testing

ipfs-webdav implements the base RFC4918 WebDAV specification.

The official standard for testing any WebDAV implementation is litmus. All tests will be run using it.

Installing Litmus

To get started, first install Litmus:

  1. Download the archive: curl -O http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz
  2. Unpack it: tar xf litmus-0.13.tar.gz
  3. Navigate to the program folder: cd litmus-0.13
  4. Configure build: ./configure
  5. Build and install: make

Running Litmus

Once Litmus is installed, run it to test ipfs-webdav: litmus dav://127.0.0.1:4918

Expected Output of Running Litmus Tests

(Truncated to exclude individual tests)

-> running `basic':  
...  
<- summary for `basic': of 16 tests run: 16 passed, 0 failed. 100.0%  
-> running `copymove':  
...  
<- summary for `copymove': of 13 tests run: 13 passed, 0 failed. 100.0%  
-> running `props':  
...  
<- summary for `props': of 30 tests run: 30 passed, 0 failed. 100.0%  
-> running `locks':  
...  
<- summary for `locks': of 41 tests run: 41 passed, 0 failed. 100.0%  
-> running `http':  
...  
<- summary for `http': of 4 tests run: 4 passed, 0 failed. 100.0%

Thanks & Acknowledgements

webdav-handler

Much of the WebDAV functionality is based on webdav-handler. Big thanks to Miquel for his ongoing work in creating/maintaining an elegant rust implementation of the WebDAV protocol.

ipfs-api

ipfs-api is a great rust implementation of the IPFS RPC API, which tremendously helped in interfacing with IPFS.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 5

cargo fmt