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.0.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.0-py3-none-any.whl (477.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xwing-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 94000530b67d1f27310031f506fb52727dce50939d4fe76d95ddcb58c1ca394d
MD5 67e9b8964f2d15f7108031368c32d11e
BLAKE2b-256 89c05bc300da4262983cc7a58bca01679dfff93e2a486f9a576c9463227bc8d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xwing-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0a786022bf6c59a3cc01ca6e6f51523bdf840db467dfdde7030e9a616eb352c
MD5 2e6bf6f8895b8d02164e477bc03109b1
BLAKE2b-256 13d5e9d1fd3bccd754b29ffe6e69c43c0535785a622870b7683d5287e517b166

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