Repository navigation
feat(rpcclient): WebDAV bridge for mounting remote paths in Finder - #447
Merged
Merged
Conversation
doronz88
force-pushed
the
feat/webdav-mount
branch
5 times, most recently
from
August 18, 2026 19:41
8131eb8 to
6323af9
Compare
Serve any remote target path over a local async WebDAV server (ASGIWebDAV) running inside the rpcclient process. Each WebDAV request is translated into client.fs calls, so a WebDAV client (macOS Finder, Windows Explorer, GNOME Files, ...) can browse and edit the remote filesystem read-write as a mounted volume. Works for iOS/macOS/Linux targets since it only uses the fs subsystem; no server-side changes. - new `webdav` subsystem on CoreClient: `await p.webdav.serve(path, ...)` - `rpcclient HOSTNAME webdav [PATH] [--mount]` subcommand and standalone `rpcdav` - served path is a positional argument, defaulting to / - `--mount` mounts and reveals the volume using the host's native mechanism (mount_webdav on macOS, net use on Windows, gio on Linux), falling back to printing the URL when none is available; the mount point is named rpc-<hostname>-<path>-<rand> so it is easy to spot in Finder - swallow Finder metadata writes (.DS_Store / AppleDouble ._*) so they never hit the remote and never error on read-only roots - refuse to open non-regular files (fifos/devices/sockets): opening them blocks the single serialized RPC channel and would wedge the whole mount - build parent paths via remote_path() rather than RemotePath.parent, which drops the bound client on Python < 3.12 - translate fs failures into clean WebDAV statuses instead of 500 tracebacks Adds asgiwebdav + uvicorn (and backports.zstd on Python < 3.14) as dependencies, and httpx to the test extra.
Add a "Mounting in Finder (WebDAV)" guide covering rpcdav and the rpcclient webdav subcommand, and surface the WebDav subsystem in the core API reference. Notes cross-platform mounting, client-side caching (out-of-band changes can appear stale until the client revalidates), read-write behavior, .DS_Store handling, the non-regular-file limitation, and the chmod/chown WebDAV limitation.
doronz88
force-pushed
the
feat/webdav-mount
branch
from
August 18, 2026 19:51
6323af9 to
a9b0f49
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a WebDAV bridge so any remote target path can be mounted read-write in macOS Finder (or any WebDAV client).
A local async WebDAV server (ASGIWebDAV) runs inside the rpcclient process; every WebDAV request is translated into
client.fscalls against the target. Nothing runs on the target and there are no C-server changes — it works identically for iOS / macOS / Linux targets since it only uses the existingfssubsystem.WebDAV was chosen over FTP because macOS Finder mounts FTP read-only (it only permits writes to servers implementing WebDAV class-2
LOCK), whereas WebDAV mounts read-write. ASGIWebDAV is async-native, so the providerawaitsclient.fsdirectly on the client's event loop — no thread bridge.Usage
--mountmounts it locally viamount_webdavand reveals it; otherwise thehttp://127.0.0.1:PORTURL is printed for Finder's Go → Connect to Server. Options:--path(default/),--host,--bind-port/--port,--readonly. Programmatic:await p.webdav.serve(path, ...).Details
webdavsubsystem onCoreClient(RpcFsProviderimplementsPROPFIND/GET/HEAD/PUT/DELETE/MKCOL/MOVEagainstclient.fs).asgiwebdav+uvicornadded as default dependencies..DS_Store, AppleDouble._*, …) writes are swallowed — reported as success but never written to the remote, so they don't error on read-only roots (e.g. iOS/).fsfailures are translated into clean WebDAV statuses (403/409) instead of 500 tracebacks.Testing
tests/test_webdav.py— each WebDAV op round-trips against a live client, plus the.DS_Store-swallow and fs-failure-handling cases, plus CLI registration.mount_webdav(the kernel client Finder uses): mounted read-write, full create/read/write/mkdir/rename/delete round-trip landing on the backing store,.DS_Storeswallowed with zero tracebacks.