Select a connection to begin
+diff --git a/README.md b/README.md index 5049237..dfd0d3b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,52 @@ # client -Desktop App for Distance. + +Web viewer for [Distance](https://github.com/distancedesktop/agent) — connects to +a Distance agent over raw WebTransport and decodes its H.264 stream in the +browser. + +No Electron, no framework: vanilla TypeScript built with Vite. + +## Usage + +```bash +npm install +npm run dev # dev server on :5173 +npm run build # static bundle in dist/ +``` + +Serve `dist/` from any static host. WebTransport requires a secure context, so +use `https://` (or `localhost`) when serving it. + +Add a connection with the agent's host, port (`52020` by default) and the +SHA-256 certificate fingerprint the agent prints on startup. + +Tick **Trusted certificate** and leave the fingerprint blank only when the agent +presents a **CA-trusted** certificate — served through a reverse proxy, or run +with `--cert`/`--key` pointing at a real certificate for that hostname. That mode +omits `serverCertificateHashes` entirely and relies on normal browser PKI +validation, so a self-signed certificate supplied via `--cert`/`--key` will be +rejected. + +For a self-signed certificate, keep the fingerprint. The agent only prints it +with `--fingerprint` when it manages its own certificate; for a custom one, +compute it from the DER bytes: + +```bash +openssl x509 -in cert.pem -outform der | openssl dgst -sha256 +``` + +## Protocol + +Control messages are newline-delimited JSON on one bidirectional stream; video +is raw H.264 Annex B on server-initiated unidirectional streams. See +`src/types.ts` for the message shapes, which track the agent's `src/session.go`. + +## Requirements + +A browser with both WebTransport and WebCodecs: + +| Browser | Required | +|---------|----------| +| Chrome / Edge | 97+ | +| Firefox | 114+, with WebCodecs enabled | +| Safari | 26.4+ (WebTransport); WebCodecs H.264 needs 16.4+ | diff --git a/forge.config.js b/forge.config.js deleted file mode 100644 index 224e07d..0000000 --- a/forge.config.js +++ /dev/null @@ -1,31 +0,0 @@ -module.exports = { - packagerConfig: { - name: 'Distance Desktop', - appBundleId: 'com.distance.desktop-client', - appCategoryType: 'public.app-category.utilities', - asar: true, - ignore: [ - /^\/src/, - /^\/scripts/, - /^\/node_modules\/\.cache/, - /^\/\.git/, - /^\/\.gitignore/, - /^\/forge\.config\.js/, - /^\/tsconfig.*/, - /^\/vite\.config\.ts/, - /^\/README\.md/, - /^\/LICENSE/, - /^\/\.DS_Store/, - ], - }, - makers: [ - { - name: '@electron-forge/maker-dmg', - config: {}, - }, - { - name: '@electron-forge/maker-zip', - config: {}, - }, - ], -} diff --git a/index.html b/index.html index 062619b..021c691 100644 --- a/index.html +++ b/index.html @@ -3,11 +3,23 @@
- + + +Select a connection to begin
+