Dawnline 0.2.0

- Diagnostics page: Health and Log tabs in place of Health and Activity
- Watchdog: repairs the AmneziaWG module, tunnels, nft table, firewall
  rules, uhttpd portal setting, portal, resolver and rpcd after two bad
  checks in a row, with backoff; after 3 failed repairs logs once in red,
  keeps repairing quietly and logs "restored" when it works again
- Heartbeat cron job restarts a hung agent
- Service log: tunnel and service starts with reasons (restarted, router
  start, update, crash), stops Dawnline made itself vs unexpected ones,
  certificate renewal and expiry, WAN address changes
- Admin actions logged as "You ..." with their own icon and tint; every
  event has an icon tile; names kept for removed people and devices;
  server pill on events when there are several servers
- Log filters: All, Connections, People, System, Problems; search and the
  command palette removed
- Home network reaches people's devices: fw4 forwarding from the home
  zones, limited to people with home access
- "Devices reach each other" per server, in the Access card
- Portal: "This device" card first with a dotted border, key rotation and
  copy address in the menu, devices sorted Online/Offline/Not set up/Paused,
  over-limit slots in orange
- People cards: slot bar, Online / Never connected, add chip always shown
- Person and device pages: Add device tile, Connect at the bottom with
  File/Key/QR tabs, status text without dots; pulsing server tab dot
- Server pill: Running / Not running / Turned off
This commit is contained in:
Aemeath committed 2026-10-15 17:05:24 +03:00
1 parent d0955e44b8
commit 82ab86848e
50 files changed
+2166 -982

No files matched your search

+9 -1
View File
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';
import { inflateSync } from 'node:zlib';
import { bytes, daysLeft, initials, quotaText, slugify } from '../src/shared/format';
import { byDeviceState, bytes, daysLeft, initials, quotaText, slugify } from '../src/shared/format';
import { amneziaJson, base64Url, fromBase64Url, vpnKey, withPrivateKey } from '../src/shared/vpnkey';
import type { ClientConfig } from '../src/shared/types';
@@ -89,3 +89,11 @@ describe('vpn:// keys', () => {
expect(c.amnezia.client_priv_key).toBe('ZZZ=');
});
});
describe('byDeviceState', () => {
it('puts online first, then offline, not set up and turned off, keeping the order within each', () => {
const d = (name: string, online: boolean, handshake: number, disabled = false) => ({ name, online, handshake, disabled });
const list = [d('off', false, 5, true), d('new', false, 0), d('away1', false, 9), d('live', true, 10), d('away2', false, 3)];
expect(byDeviceState(list).map((x) => x.name)).toEqual(['live', 'away1', 'away2', 'new', 'off']);
});
});