Dawnline 0.18.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
- Add V2RayTun to a device's set-up on Android: its awg:// link as a code and to copy, in the portal and in the admin (phones, tablets and other devices), with the server's IP, which its Android app needs; not with the Maximum disguise. Its Windows app is ready but stays off until it gives the tunnel the server's DNS. - Portal: show V2RayTun's Telegram channel beside Google Play. - Make WireGuard part of AmneziaWG's choice when the disguise is off: the same file and code, both apps named in the steps, WireGuard's store a tap away; a router still picks its package. - Portal: Reconnect asks again what the device is and about LAN Bypass, and LAN Bypass switches from a device's ⋯ menu, in a group of its own between the copy actions and Rename, Reconnect, Remove (the keys stay; the device takes its updated configuration). - Turn LAN Bypass on by default for new devices, in the portal and the admin. - Portal: an app's name too long for the picker fades at its edge and glides to its end on hover or tap; two store buttons stack where they do not fit side by side; the month chart's "Today" stays inside its axis. - Write to the router's system log by level (Settings → Logs & history → System log: errors, warnings, normal, verbose): the service starting and stopping, every apply with its time, network, firewall, nftables and peer changes, changed settings and portal errors, in English whatever the admin's language, with keys masked. - Activity: say what a device's change on the portal was (LAN Bypass on or off, its type). - Demo: build again after a force-pushed main instead of failing on the commit that is gone.
This commit is contained in:
1 parent
18e3013047
commit
f8130e39a8
65 files changed
+2066
-338
No files matched your search
@@ -4,14 +4,16 @@
|
||||
// sync's nft and awg steps fail harmlessly in the container. /etc/config/dawnline
|
||||
// and the issued and reconnect marks are put back after.
|
||||
import { readfile, writefile, unlink } from 'fs';
|
||||
import { DATA_DIR, ensure_dir } from 'dawnline.util';
|
||||
import { DATA_DIR, RUN_DIR, ensure_dir } from 'dawnline.util';
|
||||
import * as core from 'dawnline.core';
|
||||
import * as awg from 'dawnline.awg';
|
||||
import * as people from 'dawnline.rpc.people';
|
||||
import * as devices from 'dawnline.devices';
|
||||
|
||||
const CONFIG = '/etc/config/dawnline';
|
||||
const ISSUED = `${DATA_DIR}/issued.json`;
|
||||
const RECONNECT = `${DATA_DIR}/reconnect.json`;
|
||||
const EVENTS = `${RUN_DIR}/events.json`;
|
||||
|
||||
// fn(), then the files as they were, whatever fn did.
|
||||
function kept(paths, fn) {
|
||||
@@ -65,3 +67,20 @@ test('device_rotate: New keys set the device up again', () => {
|
||||
});
|
||||
eq(core.load().devices.alice_phone.private_key, '', 'the fixture is back');
|
||||
});
|
||||
|
||||
test('portal: Reconnect changes what it is and LAN Bypass with the keys; LAN Bypass alone keeps them', () => {
|
||||
ensure_dir(RUN_DIR);
|
||||
kept([ CONFIG, ISSUED, RECONNECT, EVENTS ], () => {
|
||||
let mine = { by: 'portal', person: 'alice' };
|
||||
devices.reconnect('alice_phone', { ...mine, kind: 'tablet', lan_bypass: true });
|
||||
let d = core.load().devices.alice_phone;
|
||||
eq([ d.kind, d.lan_bypass ], [ 'tablet', true ], 'changed in the same write as the keys');
|
||||
let keys = d.public_key;
|
||||
devices.update('alice_phone', { lan_bypass: false }, mine);
|
||||
d = core.load().devices.alice_phone;
|
||||
eq([ d.lan_bypass, d.public_key ], [ false, keys ], 'LAN Bypass off, the keys as they were');
|
||||
throws(() => devices.update('alice_phone', { mtu: '1400' }, mine), /^Only the admin can change how a device connects\.$/, "the MTU stays the admin's");
|
||||
throws(() => devices.reconnect('alice_phone', { ...mine, kind: 'toaster' }), /^Unknown device type\.$/, 'not a kind');
|
||||
throws(() => devices.update('alice_phone', { lan_bypass: true }, { by: 'portal', person: 'bob' }), /^Device not found\.$/, "another person's device");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user