Dawnline 0.20.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 / Backend (Go: vet, tests, a real ubusd and uhttpd) (push) Blocked by required conditions
CI / Package files (push) Blocked by required conditions

- **Backend rewritten in Go.** One daemon, `dawnlined`, replaces the whole ucode backend: the rpcd plugin, the agent, the CLI and the updater. The package no longer depends on ucode.
- **Per-architecture builds.** The release carries the backend for arm64, ARMv7, mips, mipsle and amd64; the router fetches its own after the package is installed and checks its sha256. Dawnline does not run on other architectures (older ARM, 32-bit x86, RISC-V).
- **Faster on the router.** A firewall sync takes 0.06 s instead of 0.9 s; a full apply takes about 300 ms. The portal is served by the daemon itself, without a CGI process per request.
- **Live pages.** The admin and the portal follow a live stream from the router instead of re-fetching the whole state every 30 seconds.
- **Admin redesigned in the portal's style.** Three sections (Overview · Log · Settings); a server is a page of its own with People, Places and Settings; a device opens as a dialog over its person.
- **Changes wait for «Apply».** Every setting, and a person's access, is staged in one dock before it reaches the router.
- **Configuration rollout.** After a change that makes devices fetch their configuration again, the admin shows how many have fetched it and who has not. Every setting shows beforehand (⟳N) how many devices it will touch.
- **Waiting for a decision.** Overview and People put first the people who need one (access ended, limit reached, a device that does not connect), each with its one action a tap away.
- **Bulk actions on people.** «Select» (or a long press on a card) picks several people to extend by a month, pause or resume at once.
- **Undo.** An action done from a card or a request is undone from its toast.
- **Update dialogs redesigned.** An update is one view from its question to its result; Dawnline's own update runs in it like every other, and the page reloads itself once the new version answers. Other versions are a list, each with its notes and Install on a page of its own.
- **Site to site: networks behind a router.** A router connected as a device can have networks behind it (up to eight, /16 to /30): the server routes them and applies the router's access to them. A network that shares addresses with a tunnel, the router's own networks or another site is refused by name.
- **Routers from the portal.** People can add a router and name its networks on their own page; the admin accepts or declines with a reason, or lets them through without asking.
- **Check access and Health know the networks behind routers.**
- **Usage limits reworked.** A monthly limit no longer follows the calendar. A person's month starts with their first traffic and ends a month later; the next one starts only when they connect again, so time away uses up none of it. Before, everyone's limit reset on the 1st.
- Extra data lasts until that person's month ends; «Reset usage» starts the month anew.
- A limit is for a month or for the whole term; the admin and the portal show when it resets.
- Charts that said «this month» show the last 30 days.
- After the update nobody loses what was counted: the month that was running becomes the person's first and ends on the 1st.
- **Access by time of day removed.** The Hours limit is gone from the admin, the portal and the backend; saved hours are dropped.
- **Expiry simplified.** An end date always stops access, with a heads-up three days before; the per-person choice is gone.
- **No false disconnects from sleeping phones.** A phone or a tablet stays online through ten minutes of silence.
- **Mobile Safari fixes.** Pressing a control no longer sends the page to its top; tab tracks that do not fit scroll; switches animate after a press.
This commit is contained in:
Aemeath committed 2026-11-13 09:43:50 +03:00
1 parent f8130e39a8
commit ac90575b0b
788 files changed
+139244 -41720

No files matched your search

+25 -102
View File
@@ -1,9 +1,8 @@
// Disguise methods: one picker for the Server page and the setup wizard.
// The disguise methods in words: what each does to the traffic, which apps
// take it, what the router needs for it, and how a switch to it is said (the
// Server page's presets and the new server's sheet draw them). No DOM.
import type { AwgCaps } from '../shared/types';
import { E } from './e';
import { icon } from '../shared/icons';
import { fmt } from '../shared/i18n';
export type Method = 'balanced' | 'max' | 'off';
/** The router features a method may need (the boolean ones of AwgCaps). */
@@ -12,55 +11,41 @@ type AwgNeed = 'v2' | 'v3';
export interface MethodInfo {
id: Method;
title: string;
ic: string;
/** What it does, and what it costs. */
text: string;
/** 0-4, shown as dots. */
stealth: number;
speed: number;
/** Which apps can connect. */
/** Which apps connect with it. */
apps: string;
/** The same, short (server header). */
short: string;
/** Router capability it needs. */
needs?: AwgNeed;
/** The question before switching to it. */
ask: string;
}
/** The methods in picker order, in the page's language. */
function methods(): MethodInfo[] {
/** The methods in the presets' order, in the page's language. */
export function methods(): MethodInfo[] {
return [
{
id: 'off',
title: _('Off'),
ic: 'zap',
stealth: 0,
speed: 4,
text: _('Plain WireGuard-compatible traffic. Fastest, but easy to recognise and block.'),
text: _('Plain WireGuard. Fast, but easy to recognise and block.'),
apps: _('Any WireGuard app'),
short: _('Any WireGuard app'),
ask: _('Turn the disguise off?'),
},
{
id: 'balanced',
title: _('Balanced'),
ic: 'shield',
stealth: 3,
speed: 4,
text: _('Traffic does not look like a VPN. About the same speed.'),
apps: _('AmneziaWG 2.0+, AmneziaVPN 4.8.12+'),
needs: 'v2',
text: _(
'AmneziaWG 2.0: junk packets, padded packets and a first packet that looks like DNS. For networks that learned to spot 1.0-style junk.',
),
apps: _('AmneziaVPN 4.8.12 or newer, AmneziaWG 2.0+ apps'),
short: _('AmneziaWG 2.0+ apps'),
ask: _('Switch the disguise to Balanced?'),
},
{
id: 'max',
title: _('Maximum'),
ic: 'lock',
stealth: 4,
speed: 3,
text: _('For networks that block everything. Slower.'),
apps: _('AmneziaWG 3.1+, not V2RayTun'),
needs: 'v3',
text: _('AmneziaWG 3.1: encrypted packet headers, random tails and sizes, jittered timing, and a first packet that looks like DNS.'),
apps: _('Apps with AmneziaWG 3.1 (current AmneziaVPN)'),
short: _('AmneziaWG 3.1 apps'),
ask: _('Switch the disguise to Maximum?'),
},
];
}
@@ -70,89 +55,27 @@ export const methodInfo = (id: string): MethodInfo | undefined => methods().find
/** The disguise a new server gets: the strongest this router can run. */
export const defaultMethod = (caps: AwgCaps): Method => (caps.v3 ? 'max' : caps.v2 ? 'balanced' : 'off');
/** A method this router can run. */
export const runs = (m: MethodInfo, caps: AwgCaps): boolean => !m.needs || !!caps[m.needs];
/**
* Servers made before 0.8 may carry the old Standard or Strong disguise
* (1.0-style junk only, which networks learned to spot). They keep running;
* the picker offers Balanced or Maximum instead. The title for such a server, or null.
* the presets offer Balanced or Maximum instead. The title for such a server, or null.
*/
export const legacyTitle = (preset: string): string | null =>
preset === 'standard' ? _('Standard (old)') : preset === 'strong' ? _('Strong (old)') : null;
/** The disguise's name as a server has it: a method, an old one, or set by hand. */
export const presetName = (preset: string): string => methodInfo(preset)?.title ?? legacyTitle(preset) ?? _('Custom', 'disguise');
/**
* Why a method is not available. `installed` is false while no AmneziaWG is
* installed at all ("newer" would be misleading then).
*/
function needsText(need: AwgNeed, installed: boolean): string {
export function needsText(need: AwgNeed, installed: boolean): string {
if (!installed) return need === 'v2' ? _('Needs AmneziaWG on the router.') : _('Needs AmneziaWG 3.1 on the router: install it first.');
return need === 'v2'
? _('Needs AmneziaWG 2.0 or newer on the router (kmod-amneziawg and amneziawg-tools from July 2025 on).')
: _('Needs AmneziaWG 3.1 on the router (kmod-amneziawg and amneziawg-tools 3.1).');
}
function dots(n: number, label: string): HTMLElement {
return E('span', { class: 'dl-dots', title: fmt(_('%s: %s of 4'), label, n) }, [
E('span', { class: 'dl-dots-label' }, label),
E(
'span',
{ class: 'dl-dots-row' },
[0, 1, 2, 3].map((i) => E('i', { class: i < n ? 'on' : '' })),
),
]);
}
/**
* Method cards. `current` gets a badge; unavailable methods stay visible but
* disabled with the reason, so it is clear what an upgrade would bring.
* `installed` is false while the router has no AmneziaWG tools at all.
*/
export function methodPicker(
caps: AwgCaps,
selected: Method,
onSelect: (m: Method) => void,
current?: string,
installed = true,
): HTMLElement {
const el = E('div', { class: 'dl-methods', role: 'radiogroup', 'aria-label': _('Disguise method') });
const paint = () =>
dom.content(
el,
methods().map((m) => {
const ok = !m.needs || caps[m.needs];
const on = m.id === selected;
return E(
'button',
{
type: 'button',
role: 'radio',
'aria-checked': on ? 'true' : 'false',
'aria-disabled': ok ? null : 'true',
class: `dl-method${on ? ' on' : ''}${ok ? '' : ' off'}`,
click: () => {
if (!ok || on) return;
selected = m.id;
paint();
onSelect(m.id);
},
},
[
E('div', { class: 'dl-method-head' }, [
E('span', { class: 'dl-method-ic' }, icon(m.ic)),
E('b', {}, m.title),
m.id === current ? E('span', { class: 'dl-pill ok' }, _('Current')) : '',
]),
E('p', {}, m.text),
E('div', { class: 'dl-method-meters' }, [dots(m.stealth, _('Stealth')), dots(m.speed, _('Speed'))]),
E(
'div',
{ class: 'dl-method-foot' },
ok
? [icon(m.id === 'off' ? 'wireguard' : 'amneziawg'), E('span', {}, m.apps)]
: [icon('alert'), E('span', {}, needsText(m.needs!, installed))],
),
],
);
}),
);
paint();
return el;
}