Files
simplexmq/xftp-web
sh 328d3b941a xftp-web: use XFTP server domain in share link, verify on download (#1732)
* xftp-web: use XFTP server domain in share link, verify on download

Use a random XFTP server host from the file description as the link
origin instead of the current page domain. On download, verify
that the hosting domain matches one of the servers in the description.

* xftp-web: use first description server as link origin

* xftp-web: show wrong server error in download UI instead of blank page
2026-03-11 15:59:26 +00:00
..
2026-03-09 14:26:40 +00:00

xftp-web

Browser-compatible XFTP file transfer client in TypeScript.

Prerequisites

  • Haskell toolchain with cabal (to build xftp-server)
  • Node.js 20+
  • Chromium system dependencies (see below)

Setup

# Build the XFTP server binary (from repo root)
cabal build xftp-server

# Install JS dependencies
cd xftp-web
npm install

# Install Chromium for Playwright (browser tests)
npx playwright install chromium

If Chromium fails to launch due to missing system libraries, install them with:

# Requires root
npx playwright install-deps chromium

Running tests

# Browser round-trip test (vitest + Playwright headless Chromium)
npm run test

The browser test automatically starts an xftp-server instance on port 7000 via globalSetup, using certs from tests/fixtures/.

Build

npm run build

Output goes to dist/.