Skip to main content

File sharing server with WebDAV support

Project description

X-wing

X-wing

A self-contained file sharing server with WebDAV support. Works out of the box or integrates with LDAPGate for corporate LDAP/AD authentication.

Features

  • WebDAV server — mount as a drive on Windows, macOS, and Linux using native WebDAV clients
  • Resumable uploads — chunked uploads with session recovery; supports large files (up to 10 GB)
  • Browser-based file browser — drag-and-drop upload, directory creation, zip download, file delete
  • In-browser text editor — CodeMirror-powered editor for text files (configurable via _EDITABLE_EXTS); files over 2 MB are not editable
  • WebDAV COPY / MOVE — server-side file and directory copy/move via Destination header
  • Optional LDAP / AD authentication — via LDAPGate
  • Single self-contained wheel — no external CDN dependencies; fonts embedded as base64 WOFF2

Install

pip install xwing

For LDAP/AD authentication:

pip install 'xwing[ldap]'

Usage

xwing serve --root /path/to/serve

Opens the file browser at http://127.0.0.1:8989 and launches your default browser.

Options:

--root PATH          Root directory to serve. [required]
--host TEXT          Bind host. [default: 127.0.0.1]
--port INTEGER       Bind port. [default: 8989]
--no-open            Don't open the browser automatically.
--max-upload-gb NUM  Max upload size in GB. [default: 10]
--require-auth       Require X-Forwarded-User header (403 if missing).
--user-header TEXT   Header to read username from. [default: X-Forwarded-User]
--reload             Auto-reload on code changes (dev only).
--ldap-config PATH   Path to LDAPGate YAML config to enable LDAP authentication.

WebDAV Mount Examples

Linux (DAVfs2):

sudo mount.davfs http://localhost:8989 /mnt/xwing -o username=<user>

macOS:

open http://localhost:8989
# Or mount: Finder → Go → Connect to Server → http://localhost:8989

Windows (native WebDAV):

net use Z: \\localhost@8989\DavWWWRoot /persistent:yes

Resumable Upload (Chunked)

For large files, use the chunked upload API:

# 1. Init session
curl -X POST http://localhost:8989/_upload/init \
  -H "Content-Type: application/json" \
  -d '{"filename": "big.iso", "total_chunks": 100, "dir": "/"}'

# 2. Upload each chunk
curl -X PUT http://localhost:8989/_upload/<session_id>/<chunk_index> \
  --data-binary @chunk.part

# 3. Complete
curl -X POST http://localhost:8989/_upload/<session_id>/complete

LDAP / Active Directory Authentication

X-wing supports two modes for LDAP/AD auth:

Mode 1 — Standalone proxy: Run LDAPGate as a reverse proxy in front of xwing. Authenticated requests get an X-Forwarded-User header that xwing reads.

Browser → LDAPGate → xwing
ldapgate serve --config ldapgate.yaml
xwing serve --root /data --require-auth

Mode 2 — Built-in middleware: Inject LDAPGate directly into xwing as FastAPI middleware:

pip install 'xwing[ldap]'
xwing serve --root /data --ldap-config /path/to/ldapgate.yaml

See the LDAPGate README for config file documentation.

Development

Requires uv.

git clone https://github.com/anudeepd/xwing
cd xwing
uv sync
uv run xwing serve --root .

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xwing-0.2.1.tar.gz (482.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xwing-0.2.1-py3-none-any.whl (477.1 kB view details)

Uploaded Python 3

File details

Details for the file xwing-0.2.1.tar.gz.

File metadata

  • Download URL: xwing-0.2.1.tar.gz
  • Upload date:
  • Size: 482.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for xwing-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7dbdaaf72c9c06e959795f604972f399d12f59babd595fb32ee1c26889f81460
MD5 a88486206678afba1e935f5984106b14
BLAKE2b-256 6901135c849a1e8d3fcc94359e446bbb44008b877c54ecfc3b1d41e24d792469

See more details on using hashes here.

File details

Details for the file xwing-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: xwing-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 477.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for xwing-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1b5919866926cc5f11756395f224d2a4cdd295a20fc5ef6ac25d57f8e94540ba
MD5 7d9f920038bdbd75d3e5c265db323491
BLAKE2b-256 79078de5eee18d6d44617c180933f99418e3c62b55e346edda2f68041ee00f82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page