31 lines
1.8 KiB
Plaintext
31 lines
1.8 KiB
Plaintext
---
|
|
title: "Browser-Based App Integration"
|
|
description: "Build privacy-preserving browser apps with mixFetch and the Nym WASM SDK. Route HTTP requests and messages through the mixnet from the browser."
|
|
schemaType: "TechArticle"
|
|
section: "Developers"
|
|
lastUpdated: "2026-04-07"
|
|
---
|
|
|
|
import { Callout } from 'nextra/components';
|
|
|
|
# Browser-Based Apps
|
|
|
|
Browsers are a restricted environment: communication is limited to WebSockets, Web Transport, and WebRTC; mixed content policies enforce HTTPS-only; and there is no access to the filesystem or system calls. The main obstacle for routing traffic through the Mixnet is the lack of access to browser TLS negotiation or the CA certificate store from JavaScript.
|
|
|
|
Two integration options are available, both delivered as packages bundled into your web application.
|
|
|
|

|
|
|
|
| Module | What it does | Links |
|
|
|---|---|---|
|
|
| **mixFetch** | Drop-in `fetch` replacement — HTTP(S) requests via Exit Gateways with an embedded CA store for browser-to-destination TLS over the Mixnet | [docs](./typescript#mixfetch) · [example](./typescript/playground/mixfetch) |
|
|
| **WASM Client** | Sphinx packets and cover traffic in WASM, sent over WebSocket to the Entry Gateway — messaging mode only (text/binary payloads), runs in a web worker | [docs](./typescript#mixnet-client) · [example](./typescript/playground/traffic) |
|
|
|
|
<Callout type="info">
|
|
`mixFetch` currently supports a maximum of 10 concurrent in-flight requests. `mixFetchv2`, which will function as a general-purpose userspace IP stack, is in development.
|
|
</Callout>
|
|
|
|
<Callout type="warning">
|
|
The WASM Client does not support IP packet routing (IPR) or stream-like APIs. For HTTP(S) requests from the browser, use `mixFetch`. Standard browser CSP and mixed content restrictions (HTTPS only) apply to the WebSocket connection.
|
|
</Callout>
|