Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions websocket-bug-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
12 changes: 12 additions & 0 deletions websocket-bug-demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:20-alpine

WORKDIR /app

COPY package*.json ./
RUN npm install

COPY . .

EXPOSE 7654 6543

CMD ["node", "server.js"]
31 changes: 31 additions & 0 deletions websocket-bug-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# WebSocket Bug Demo

A demo project to reproduce a WebSocket connection bug in Zen browser.

## The Bug

When opening a web app served from `localhost:7654` and attempting to connect to a WebSocket server on `localhost:6543` (different port), the connection gets blocked by the browser.

This issue appears to originate from Zen browser's Advanced Tracking Protection functionality, though the exact cause is still uncertain.

## Quick Start

### Option 1: Docker (recommended)

```bash
docker compose up --build
```

### Option 2: Local

```bash
npm install
npm start
```

## Usage

Open http://localhost:7654 in your browser and click "Connect".

- **HTTP server**: `localhost:7654` - serves the client UI
- **WebSocket server**: `localhost:6543` - sends pings every 5 seconds
7 changes: 7 additions & 0 deletions websocket-bug-demo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
websocket-demo:
build: .
ports:
- "7654:7654"
- "6543:6543"
restart: unless-stopped
Loading