> ## Documentation Index
> Fetch the complete documentation index at: https://e-gurl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DNS Leak Test Dashboard

> Comprehensive DNS leak detection with web dashboard, IPv6/WebRTC testing, and privacy scoring

# DNS Leak Test Dashboard

DNS-MNS includes a comprehensive DNS leak test dashboard inspired by [dnsleaktest.com](https://dnsleaktest.com/). The web dashboard features a modern purple-themed design matching the TUI's visual identity, with real-time WebSocket updates, dark/light themes, and expanded leak detection capabilities.

## What's New in v7.0.0

<CardGroup>
  <Card title="Web Dashboard" icon="globe">
    Beautiful web interface with real-time WebSocket updates at `http://localhost:8080`
  </Card>

  <Card title="Dark/Light Theme" icon="moon">
    Toggle between dark and light modes with persistent preference
  </Card>

  <Card title="42 DNS Resolvers" icon="server">
    Expanded from 12 to 42 resolvers for comprehensive testing
  </Card>

  <Card title="Privacy Score" icon="shield-check">
    0-100 score based on leak detection results
  </Card>

  <Card title="IPv6 Leak Test" icon="network-wired">
    Detect IPv6 traffic bypassing your VPN
  </Card>

  <Card title="WebRTC Leak Test" icon="video">
    Identify browser-based IP leaks
  </Card>

  <Card title="Test History" icon="clock-rotate-left">
    SQLite-based persistent history with trends
  </Card>

  <Card title="Export Options" icon="file-export">
    Export results as HTML, JSON, or Markdown
  </Card>
</CardGroup>

## Quick Start

### TUI Mode (Default)

```bash theme={null}
# Launch interactive terminal dashboard
dns-mns leaktest

# Or use the full command name
dns-mns leak-test-dashboard
```

### Web Dashboard Mode

```bash theme={null}
# Start web dashboard on default port 8080
dns-mns leaktest --web

# Use custom port
dns-mns leaktest --web --port 9090
```

Then open [http://localhost:8080](http://localhost:8080) in your browser.

### JSON Output Mode

```bash theme={null}
# Run one-off test and output JSON
dns-mns leaktest --json
```

## Web Dashboard Features

### Interface Overview

The web dashboard provides a modern, responsive interface with:

* **Privacy Score Ring**: Visual 0-100 score with color coding
* **Connection Info**: Public IP, ISP, ASN, location, hostname
* **DNS Resolver Table**: 42 resolvers with status, detected IP, and latency
* **Latency Charts**: Visual comparison of resolver response times
* **Advanced Tests**: IPv6, WebRTC, and EDNS leak detection
* **Test History**: Previous test results with statistics

### Theme Toggle

Click the moon/sun icon in the top-right corner to switch between dark and light modes. Your preference is saved in browser localStorage.

<Tabs>
  <Tab title="Dark Mode">
    * Background: `#0a0812` (deep violet-black)
    * Cards: `#1a1628` (dark purple)
    * Text: `#f0ecf7` (soft white)
    * Accent: `#a78bfa` (vibrant lavender)
  </Tab>

  <Tab title="Light Mode">
    * Background: `#f5f3fa` (purple-tinted white)
    * Cards: `#ffffff`
    * Text: `#1a1528` (deep purple-black)
    * Accent: `#7c3aed` (deep purple)
  </Tab>
</Tabs>

### Exporting Results

Click the **HTML** or **JSON** buttons to download a report:

* **HTML**: Formatted report suitable for sharing or printing
* **JSON**: Raw data for programmatic processing
* **Markdown**: Documentation-friendly format (via API)

## TUI Dashboard Controls

| Key                    | Action                |
| ---------------------- | --------------------- |
| `r`                    | Run/refresh test      |
| `Tab` / `Shift+Tab`    | Switch between tabs   |
| `1-4`                  | Quick navigate to tab |
| `e`                    | Export results        |
| `h`                    | Toggle history view   |
| `q` / `Esc` / `Ctrl+C` | Quit                  |

### TUI Tabs

1. **Overview**: Connection info, summary, and status
2. **Resolvers**: Detailed resolver test results table
3. **Advanced**: IPv6, WebRTC, and EDNS test results
4. **History**: Previous test results and statistics

## Understanding Results

### Privacy Score

The privacy score (0-100) is calculated based on:

| Score  | Status       | Meaning                                    |
| ------ | ------------ | ------------------------------------------ |
| 90-100 | 🟢 Excellent | No leaks detected, strong privacy          |
| 70-89  | 🟡 Good      | Minor issues, generally secure             |
| 50-69  | 🟠 Fair      | Moderate concerns, some leaks detected     |
| 0-49   | 🔴 Poor      | Significant leaks, immediate action needed |

**Score Calculation:**

* Start: 100 points
* DNS leak: -30 points
* IPv6 high-risk leak: -25 points
* WebRTC leak: -20 points
* Multiple unique IPs: -5 each
* EDNS privacy risk: -5 to -10 points

### Connection Information

| Field         | Description                    |
| ------------- | ------------------------------ |
| **Public IP** | Your visible IP address        |
| **ISP**       | Internet Service Provider name |
| **ASN**       | Autonomous System Number       |
| **Location**  | Detected city and country      |
| **Timezone**  | Your timezone                  |
| **Hostname**  | Reverse DNS lookup result      |

### DNS Resolver Results

The dashboard tests against **42 DNS resolvers** including:

<Tabs>
  <Tab title="Global">
    * Cloudflare (1.1.1.1, 1.0.0.1)
    * Google (8.8.8.8, 8.8.4.4)
    * Quad9 (9.9.9.9, 149.112.112.112)
    * OpenDNS (208.67.222.222, 208.67.220.220)
  </Tab>

  <Tab title="Privacy">
    * Mullvad (194.242.2.2)
    * ControlD (76.76.2.0)
    * AdGuard (94.140.14.14)
    * DNS0.eu (193.17.47.1)
  </Tab>

  <Tab title="Iran/Middle East">
    * Shecan (178.22.122.100)
    * Electro (78.157.42.100)
    * Begzar (185.55.226.26)
    * Pishgaman (5.202.100.100)
  </Tab>

  <Tab title="Asia">
    * Yandex (77.88.8.8)
    * AliDNS (223.5.5.5)
    * 114DNS (114.114.114.114)
  </Tab>
</Tabs>

### Leak Status

| Status             | Meaning                               |
| ------------------ | ------------------------------------- |
| ✅ **No Leak**      | All resolvers see the same IP         |
| 🔴 **DNS Leak**    | Different resolvers see different IPs |
| 🟡 **IPv6 Leak**   | IPv6 traffic bypassing VPN            |
| 🟠 **WebRTC Leak** | Browser exposing real IP              |

## Advanced Leak Tests

### IPv6 Leak Test

Detects if your IPv6 traffic is bypassing the VPN tunnel:

```
⚠️ IPv6 Detected - HIGH Risk
Addresses:
  2001:db8::1234
  2001:db8::5678
```

**Fix:** Disable IPv6 in your network settings or use a VPN with IPv6 support.

### WebRTC Leak Test

Checks if your browser is exposing your real IP via WebRTC:

```
⚠️ WebRTC Leak Risk
Public IPs exposed:
  203.0.113.45 (Real IP)
```

**Fix:** Disable WebRTC in your browser or use browser extensions.

### EDNS Client Subnet

Tests if your DNS queries include subnet information that reduces privacy:

```
ℹ️ EDNS Enabled - MEDIUM Risk
Subnet: 203.0.113.0/24
```

## API Endpoints

When running in web mode, the following API is available:

| Endpoint                            | Method | Description                     |
| ----------------------------------- | ------ | ------------------------------- |
| `/`                                 | GET    | Web dashboard                   |
| `/ws`                               | WS     | WebSocket for real-time updates |
| `/api/test`                         | POST   | Run new test                    |
| `/api/result`                       | GET    | Get latest result               |
| `/api/history`                      | GET    | Get test history                |
| `/api/export?format=json\|html\|md` | POST   | Export results                  |

## JSON Export Format

```json theme={null}
{
  "timestamp": "2026-02-12T15:04:23Z",
  "version": "7.0.0",
  "score": 85,
  "connection": {
    "ip": "198.51.100.45",
    "isp": "Example VPN",
    "asn": "AS12345",
    "city": "London",
    "country": "UK",
    "hostname": "vpn.example.com"
  },
  "leak_detected": false,
  "leak_type": "none",
  "resolvers": [
    {
      "name": "Cloudflare",
      "ip": "1.1.1.1",
      "status": "ok",
      "sees_ip": "198.51.100.45",
      "sees_isp": "Example VPN",
      "latency_ms": 12
    }
  ],
  "ipv6_test": {
    "ipv6_detected": false,
    "leak_risk": "none"
  },
  "webrtc_test": {
    "leak_detected": false
  },
  "edns_info": {
    "supported": true,
    "privacy_risk": "low"
  },
  "unique_ips_seen": ["198.51.100.45"],
  "summary": "No DNS leak detected. Your DNS queries are properly routed."
}
```

## Troubleshooting

### "Test failed: JSON parse error"

The API returns NDJSON (newline-delimited). The dashboard handles this automatically. If you see this error, try refreshing the page.

### "All resolvers failed"

* Check internet connection
* Verify DNS works: `nslookup google.com`
* Check firewall rules

### "Privacy Score is 0"

This is valid for severe leak situations. Check:

* Is your VPN actually connected?
* Are you using split tunneling?
* Is IPv6 disabled?

### WebSocket connection fails

* Check if port is already in use
* Try a different port: `--port 9090`
* Check browser console for errors

<Warning>
  If you detect DNS leaks while using a VPN, your VPN configuration needs adjustment.
  Consider using DNS-MNS's encrypted DNS features (DoH/DoT proxy) to ensure all DNS
  queries are properly secured.
</Warning>

<Note>
  The dashboard requires internet access to test against public DNS resolvers.
  It does not work in offline mode.
</Note>
