---
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.

![](/images/developers/nym-browser-arch.png)

## mixFetch

A drop-in replacement for the browser `fetch` API that makes HTTP(S) requests via Exit Gateways using the SOCKS Network Requester. It ships with an embedded CA certificate store to establish a TLS session between `mixFetch` and the remote host, creating a secure channel from the browser to the destination over the Mixnet.

Internally, `mixFetch` uses the WASM client.

- [Docs](./typescript#mixfetch)
- [Example](./typescript/playground/mixfetch)

<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>

## WASM Client

Constructs Sphinx packets and cover traffic in WASM, sent over a WebSocket to the Entry Gateway. Responses arrive the same way.

This operates in messaging mode only (text or binary payloads) and does not currently support IP packet routing via the Exit Gateway IPR or any stream-like API. For HTTP(S) requests, use `mixFetch`.

Standard browser CSP and mixed content restrictions (HTTPS only) apply to the WebSocket connection, including in embedded WebViews.

The client runs in a web worker to keep the UI thread free.

- [Docs](./typescript#mixnet-client)
- [Example](./typescript/playground/traffic)
