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
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:
1 parent
31a2065f05
commit
fd9543ce68
30 files changed
+411
-117
No files matched your search
@@ -3,6 +3,11 @@
|
||||
// focused button), so a background refresh never takes it away.
|
||||
|
||||
import { onLiveChange } from './live';
|
||||
import { onNavigate } from '../ui/nav';
|
||||
import { notify } from '../ui/toast';
|
||||
|
||||
/** Failed ticks in a row before the page says the router is out of reach. */
|
||||
const LOST_AFTER = 3;
|
||||
|
||||
/**
|
||||
* Request tickets: an answer is shown only if nothing newer was shown before
|
||||
@@ -46,27 +51,41 @@ export interface Poller<T> {
|
||||
stop(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* A poller lives with its page: it stops itself when Outline navigates away
|
||||
* (its DOM is gone, its ticks would keep asking the router), skips ticks while
|
||||
* the tab is hidden, and says so once when the router stops answering.
|
||||
*/
|
||||
export function createPoller<T>(o: PollerOptions<T>): Poller<T> {
|
||||
const seq = new Sequence();
|
||||
let failed = 0;
|
||||
const load = async (quiet: boolean, live: boolean): Promise<T | null> => {
|
||||
const t = seq.next();
|
||||
const d = await o.fetch(live).catch(() => null);
|
||||
let d: T | null = null;
|
||||
try {
|
||||
d = await o.fetch(live);
|
||||
if (failed >= LOST_AFTER) notify('The router answers again.', 'success', 3000);
|
||||
failed = 0;
|
||||
} catch {
|
||||
if (++failed === LOST_AFTER) notify('The router is not answering: what you see may be out of date.', 'warning', 8000);
|
||||
return null;
|
||||
}
|
||||
if (d == null || !seq.take(t)) return null;
|
||||
o.apply(d, quiet);
|
||||
return d;
|
||||
};
|
||||
const refresh = (quiet = false) => load(quiet, false);
|
||||
const tick = () => ((o.active?.() ?? true) ? load(true, false) : Promise.resolve(null));
|
||||
const visible = () => document.visibilityState === 'visible';
|
||||
const tick = () => (visible() && (o.active?.() ?? true) ? load(true, false) : Promise.resolve(null));
|
||||
poll.add(tick, o.every);
|
||||
const off = o.live ? onLiveChange(() => void ((o.active?.() ?? true) && load(true, true))) : null;
|
||||
return {
|
||||
refresh,
|
||||
claim: () => seq.claim(),
|
||||
stop: () => {
|
||||
poll.remove(tick);
|
||||
off?.();
|
||||
},
|
||||
const off = o.live ? onLiveChange(() => void (visible() && (o.active?.() ?? true) && load(true, true))) : null;
|
||||
const stop = () => {
|
||||
poll.remove(tick);
|
||||
off?.();
|
||||
offNav();
|
||||
};
|
||||
const offNav = onNavigate(stop);
|
||||
return { refresh, claim: () => seq.claim(), stop };
|
||||
}
|
||||
|
||||
/** The keyboard focus (or an open native picker's input) is inside `el`. */
|
||||
|
||||
Reference in new issue
Block a user