Skip to content
Merged
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
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,43 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2026-10-12

### 🚀 Features
- Inspect HTTPS bodies with a trusted local CA
- Add trustworthy capture and cumulative proxy signals
- Add traffic investigation workspace and scoped overview
- Add focused alerting and durable incident evidence
- Add reproducible local demo and recorded walkthrough


### 🐛 Bug Fixes
- Record HTTPS CONNECT tunnels in request history
- Handle connection cleanup errors for CI lint
- Satisfy inspection lint and keep docs application agnostic
- Allow long polling through HTTPS inspection
- Polish capture status and inspection hierarchy
- Satisfy CI lint checks for incident handlers
- Validate dashboard assets instead of removed heading


### 📚 Documentation
- Align dashboard entry points with investigation workflow
- Replace demo video with native resolution recording
- Simplify readme and add screenshots from demo video


### 🧪 Testing
- Build current sources for every end-to-end suite
- Use named HTTP status in unavailable fixture
- Verify sanitized proxy failures with a local upstream


### ⚙️ Miscellaneous Tasks
- Add platform doctor scan and address platform findings
- Ignore macOS Finder metadata


## [0.1.1] - 2026-09-15

### 🚀 Features
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ RUN set -eu; \
done; \
test -s /tmp/dashboard.html; \
! grep -q "Dashboard not embedded" /tmp/dashboard.html; \
grep -q "HTTP Proxy Dashboard" /tmp/dashboard.html; \
asset_path="$(grep -o 'src="[^"]*\.js[^"]*"' /tmp/dashboard.html | head -n 1 | cut -d '"' -f 2)"; \
case "$asset_path" in "${api_prefix}/_next/"*) ;; *) echo "Dashboard JavaScript URL does not match ${dashboard_path}: ${asset_path}" >&2; exit 1;; esac; \
wget -q -O /dev/null "http://127.0.0.1:13000${asset_path}"; \
wget -q -O /tmp/health.json "http://127.0.0.1:13000${api_prefix}/api/admin/healthz"; \
grep -q '"healthy"' /tmp/health.json

Expand Down
30 changes: 16 additions & 14 deletions dashboard/e2e/dashboard.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { test, expect } from '@playwright/test';
import { createServer } from 'node:http';

test.describe('Netkit Dashboard E2E', () => {
test.beforeEach(async ({ page }) => {
Expand Down Expand Up @@ -75,19 +76,20 @@ test.describe('Netkit Dashboard E2E', () => {
}
});

test('should handle request errors gracefully', async ({ page }) => {
// Fill in an invalid URL
const urlInput = page.getByPlaceholder(/api.example.com/i);
await urlInput.fill('http://invalid-domain-that-does-not-exist-12345.com');

// Click send
await page.getByRole('button', { name: /send/i }).click();

// Wait for error to appear
await page.waitForTimeout(5000);

// Check that some error indication is shown
const errorIndicator = page.locator('text=/error|failed|could not/i').first();
await expect(errorIndicator).toBeVisible({ timeout: 10000 });
test('should display proxy failures without exposing raw error bodies', async ({ page }) => {
// Fail a real local upstream exchange without relying on public DNS behavior.
const upstream = createServer((request) => request.socket.destroy());
await new Promise<void>(resolve => upstream.listen(0, '127.0.0.1', resolve));
try {
const address = upstream.address();
if (!address || typeof address === 'string') throw new Error('Missing upstream address');
await page.getByPlaceholder(/api.example.com/i).fill(`http://127.0.0.1:${address.port}/`);
await page.getByRole('button', { name: /send/i }).click();

await expect(page.getByText('502', { exact: true })).toBeVisible();
await expect(page.getByText('[Body omitted: only complete JSON up to 64 KiB is retained]', { exact: true })).toBeVisible();
} finally {
await new Promise<void>((resolve, reject) => upstream.close(error => error ? reject(error) : resolve()));
}
});
});
5 changes: 0 additions & 5 deletions scripts/validate-docker-dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ if grep -q "Dashboard not embedded" "$tmp_dashboard"; then
exit 1
fi

if ! grep -q "HTTP Proxy Dashboard" "$tmp_dashboard"; then
echo "Docker image did not serve the expected dashboard HTML" >&2
exit 1
fi

# HTML alone can pass while a prefix mismatch breaks every browser asset.
asset_path="$(grep -o 'src="[^"]*\.js[^"]*"' "$tmp_dashboard" | head -n 1 | cut -d '"' -f 2)"
case "$asset_path" in
Expand Down
Loading