Dawnline 0.7.0
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions

- Balanced, a new disguise for AmneziaWG 2.0 apps (AmneziaVPN 4.8.12 and
  newer): junk packets, padded cookie and data packets and DNS-shaped
  signature packets, for networks that learned to spot 1.0-style junk;
  offered when both the tools and the kernel module are 2.0 or newer
- The junk count and sizes in a device's configuration are the device's own
  (shifted a little, deterministically), so two phones of one family do not
  share one profile; they never require importing again
- Components remembers which AmneziaWG build was installed on which kernel;
  after a firmware upgrade Health says the build was for the old one and
  offers the build for the new firmware. A SNAPSHOT firmware is told there are
  no builds for it
- Location lookups moved off the agent's 1-second watcher to its minute tick,
  a few per minute within a time budget; the cache lives in tmpfs and goes to
  flash hourly, and addresses still shown on the map are never pushed out of
  it (and looked up again)
- The map library from the CDN is checked against its expected hash before it
  runs inside the LuCI page
- The activity log is copied to flash only when something was logged; the
  person page and the device drawer fetch only that person's events
- Admin UI: live updates survive the theme's in-page navigation, pollers stop
  with their page and sleep while the tab is hidden, the map is freed when
  leaving the Overview, a router that stops answering is said once (and when
  it is back), and an update of Dawnline under an open page asks for a reload
- Watchdog: no repairs while an update runs; a target that keeps failing keeps
  its back-off (repairs are forgotten after ten good minutes, not one); the
  LuCI link is reloaded or restarted three times at most, not every hour for
  good; the one-click "ifup" fix accepts only Dawnline's own tunnels
- Health warns when the router's flash is nearly full (settings would stop
  saving); the portal runs two processes instead of four on routers with
  little memory
- "Remove their devices" at an end date is never done on a clock that has not
  been set yet
This commit is contained in:
Aemeath committed 2026-10-18 16:04:58 +03:00
1 parent 31a2065f05
commit fd9543ce68
30 files changed
+411 -117

No files matched your search

+36 -11
View File
@@ -13,6 +13,15 @@ import { onNavigate } from './ui/nav';
// mapcn requires maplibre-gl ^6 (the globe projection came with 5): an ES module, its worker beside it.
const MAPLIBRE = 'https://unpkg.com/maplibre-gl@6.14.0/dist';
// What those files must be (sha384): code from a CDN runs inside the LuCI
// page, where it could use the admin's session. A modulepreload with an
// integrity carries the check into the import(); the stylesheet has its own.
// The worker (loaded by the library) runs in its own context without the page
// or the session, so it goes unchecked.
const MAPLIBRE_SRI = {
module: 'sha384-q26X6R1yFeg0QR9SHHn6U3Nb0ddRRTtwxsahubv5R89/v5nijKpk9KviUp9ZLySk',
css: 'sha384-1TZtfVz7qtwR5vD7cMwjGT+9uiK4lqE3pbUOPwYO6OCpb+TYP0S9vLIhG02JCU04',
};
const STYLE_DARK = 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json';
const STYLE_LIGHT = 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json';
@@ -29,19 +38,35 @@ let loading: Promise<any> | null = null;
* leaves it alone), with the worker URL set as mapcn does.
*/
function loadMapLibre(host: HTMLElement): Promise<any> {
host.appendChild(E('link', { rel: 'stylesheet', href: `${MAPLIBRE}/maplibre-gl.css` }));
host.appendChild(
E('link', { rel: 'stylesheet', href: `${MAPLIBRE}/maplibre-gl.css`, integrity: MAPLIBRE_SRI.css, crossorigin: 'anonymous' }),
);
if (loading) return loading;
const url = `${MAPLIBRE}/maplibre-gl.mjs`;
loading = import(/* @vite-ignore */ url).then(
(gl) => {
if (!gl.getWorkerUrl()) gl.setWorkerUrl(`${MAPLIBRE}/maplibre-gl-worker.mjs`);
return gl;
},
() => {
loading = null;
throw new Error('Could not load the map library (no internet access from this browser?)');
},
);
// The preload fetches and checks the module; the module map keeps the
// result, so the import() below gets the checked copy or fails with it.
const preload = new Promise<void>((resolve, reject) => {
const link = E('link', { rel: 'modulepreload', href: url, integrity: MAPLIBRE_SRI.module, crossorigin: 'anonymous' });
link.addEventListener('load', () => resolve());
link.addEventListener('error', () => reject(new Error('integrity')));
document.head.appendChild(link);
});
loading = preload
.then(() => import(/* @vite-ignore */ url))
.then(
(gl) => {
if (!gl.getWorkerUrl()) gl.setWorkerUrl(`${MAPLIBRE}/maplibre-gl-worker.mjs`);
return gl;
},
(e: Error) => {
loading = null;
throw new Error(
e?.message === 'integrity'
? 'The map library from the CDN is not the expected file: not loading it.'
: 'Could not load the map library (no internet access from this browser?)',
);
},
);
return loading;
}