From b1222edb270f4df0e18c4759d9755378a14ad352 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 25 Oct 2020 08:05:11 +0100 Subject: [PATCH] mention rclone in docs --- README.md | 6 +++-- bin/README.md | 2 ++ docs/rclone.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 docs/rclone.md diff --git a/README.md b/README.md index e76ae1a6..e2fff148 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ turn your phone or raspi into a portable file server with resumable uploads/down * [x] accounts * [x] markdown viewer * [x] markdown editor -* [x] FUSE client +* [x] FUSE client (read-only) summary: it works! you can use it! (but technically not even close to beta) @@ -49,7 +49,9 @@ summary: it works! you can use it! (but technically not even close to beta) * `await fetch('https://127.0.0.1:3923/', {method:"PUT", body: JSON.stringify(foo)});` * `var xhr = new XMLHttpRequest(); xhr.open('POST', 'https://127.0.0.1:3923/msgs?raw'); xhr.send('foo');` -* FUSE: mount a copyparty server as a local filesystem (see [./bin/](bin/)) +* FUSE: mount a copyparty server as a local filesystem + * cross-platform python client available in [./bin/](bin/) + * [rclone](https://rclone.org/) as client can give ~5x performance, see [./docs/rclone.md](docs/rclone.md) # dependencies diff --git a/bin/README.md b/bin/README.md index ba5cceca..68e3e060 100644 --- a/bin/README.md +++ b/bin/README.md @@ -10,6 +10,8 @@ filecache is default-on for windows and macos; note that copyparty should run with `-ed` to enable dotfiles (hidden otherwise) +also consider using [../docs/rclone.md](../docs/rclone.md) instead for 5x performance + ## to run this on windows: * install [winfsp](https://github.com/billziss-gh/winfsp/releases/latest) and [python 3](https://www.python.org/downloads/) diff --git a/docs/rclone.md b/docs/rclone.md new file mode 100644 index 00000000..8d379fc8 --- /dev/null +++ b/docs/rclone.md @@ -0,0 +1,62 @@ +# using rclone to mount a remote copyparty server as a local filesystem + +speed estimates with server and client on the same win10 machine: +* `1070 MiB/s` with rclone as both server and client +* `570 MiB/s` with rclone-client and `copyparty -ed -j16` as server +* `220 MiB/s` with rclone-client and `copyparty -ed` as server +* `100 MiB/s` with [../bin/copyparty-fuse.py](../bin/copyparty-fuse.py) as client + +when server is on another machine (1gbit LAN), +* `75 MiB/s` with [../bin/copyparty-fuse.py](../bin/copyparty-fuse.py) as client +* `92 MiB/s` with rclone-client and `copyparty -ed` as server +* `103 MiB/s` (connection max) with `copyparty -ed -j16` and all the others + + +# creating the config file + +if you want to use password auth, add `headers = Cookie,cppwd=fgsfds` below + + +### on windows clients: +``` +( +echo [cpp] +echo type = http +echo url = http://127.0.0.1:3923/ +) > %userprofile%\.config\rclone\rclone.conf +``` + +also install the windows dependencies: [winfsp](https://github.com/billziss-gh/winfsp/releases/latest) + + +### on unix clients: +``` +cat > ~/.config/rclone/rclone.conf <<'EOF' +[cpp] +type = http +url = http://127.0.0.1:3923/ +EOF +``` + + +# mounting the copyparty server locally +``` +rclone.exe mount --vfs-cache-max-age 5s --attr-timeout 5s --dir-cache-time 5s cpp: Z: +``` + + +# use rclone as server too, replacing copyparty + +feels out of place but is too good not to mention + +``` +rclone.exe serve http --read-only . +``` + +* `webdav` gives write-access but `http` is twice as fast +* `ftp` is buggy, avoid + + +# bugs + +* rclone-client throws an exception if you try to read an empty file (should return zero bytes)