Dawnline 0.13.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
- "Internet like a home device" starts off on new servers: sending the tunnel through the home network costs speed. Both server wizards (the first one and "Add server") have the switch, and on it says what it costs. Servers that have it on keep it - With it off, Server → Access says what that means: DNS still goes through the router, its proxies and filters see the tunnel only once its interface is added to their source interfaces, and sites the router's DNS answers with proxy addresses won't open - With it on, established connections skip the second pass through netfilter in Dawnline's network namespace (a software flowtable): about 12% less router CPU per packet, and about a quarter more speed through a proxy on the router. Without kmod-nft-offload the old rules load and the service log says so - Its address at home stays the same when it is turned off and on again; it moved down by one each time (.254, .253, .252) - Less CPU for the same work: the background agent's once-a-second look at the tunnels, Status, Health and the portal no longer compile the same patterns again for each line, address and device. At idle the agent uses about a quarter of the CPU it did; a portal request 5-10 ms less - On LuCI's Bootstrap themes the admin looks as it does on Outline: cards and menus a step above the page, icon tiles that keep their colour, Outline's status colours in dark mode. The choices in Settings → Logs & history and Updates are LuCI's own controls in every theme - "Add from devices at home" keeps a device's name readable in a narrow window: its ports go under the name - DESIGN.md describes the portal's look, components and motion, and the rules send portal work there first. lint-ucode no longer ends a function at a brace inside a template literal
This commit is contained in:
1 parent
db9657c01c
commit
58492be021
44 files changed
+2269
-235
No files matched your search
+39
-1
@@ -1,8 +1,10 @@
|
||||
// dawnline.awg: disguise presets against their own validation, the parser
|
||||
// of `awg show all dump` on the output formats of AmneziaWG 1.0, 2.0 and 3.1
|
||||
// (the stand-in awg in fixtures/bin prints the fixture put at AWG_DUMP), and Reconnect.
|
||||
// (the stand-in awg in fixtures/bin prints the fixture put at AWG_DUMP),
|
||||
// Reconnect, and a device's configuration from the fixture model.
|
||||
import { readfile, writefile, unlink } from 'fs';
|
||||
import * as awg from 'dawnline.awg';
|
||||
import * as core from 'dawnline.core';
|
||||
|
||||
const AWG_DUMP = '/tmp/dawnline-tests/awg-dump';
|
||||
let fixtures = sourcepath(0, true) + '/fixtures';
|
||||
@@ -115,3 +117,39 @@ test('blocked reasons', () => {
|
||||
eq(awg.blocked_text(srv('has an invalid interface name "x"')), 'Home has an invalid interface name "x".', 'old fragment');
|
||||
eq(awg.blocked_note({ code: 'ifname', ifname: 'x' }), 'has an invalid interface name "x"', 'the log keeps the fragment');
|
||||
});
|
||||
|
||||
test('client_config: an IPv6 endpoint in brackets, without a regex', () => {
|
||||
let m = core.load();
|
||||
let srv = m.servers.main, dev = m.devices.alice_phone;
|
||||
let ep = (h) => {
|
||||
srv.endpoint = h;
|
||||
return match(awg.client_config(m, dev).conf, /\nEndpoint = ([^\n]*)\n/)?.[1];
|
||||
};
|
||||
eq(ep('vpn.example.com'), 'vpn.example.com:51820', 'a name');
|
||||
eq(ep('203.0.113.7'), '203.0.113.7:51820', 'IPv4');
|
||||
eq(ep('2001:db8::1'), '[2001:db8::1]:51820', 'IPv6');
|
||||
eq(ep('[2001:db8::1]'), '[2001:db8::1]:51820', 'IPv6 in brackets already');
|
||||
eq(ep(''), 'vpn.example.com:51820', 'the portal name when the server has none');
|
||||
// The regexes it stands for, on hosts changed at each character.
|
||||
for (let h in [ '2001:db8::1', '[::1]', 'a.b' ])
|
||||
for (let i = 0; i <= length(h); i++)
|
||||
for (let c in [ ':', '[', ']', 'a', '' ]) {
|
||||
let s = `${substr(h, 0, i)}${c}${substr(h, i + 1)}`;
|
||||
let want = match(s, /:/) && !match(s, /^\[/) ? `[${s}]` : s;
|
||||
eq(ep(s), `${want || 'vpn.example.com'}:51820`, s);
|
||||
}
|
||||
});
|
||||
|
||||
test('config_fingerprint leaves out the private key and the junk', () => {
|
||||
let m = core.load();
|
||||
let dev = m.devices.alice_phone;
|
||||
let f = awg.config_fingerprint(m, dev);
|
||||
ok(match(f, /^[0-9a-f]{8}$/), 'eight hex digits');
|
||||
dev.private_key = 'yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk=';
|
||||
eq(awg.config_fingerprint(m, dev), f, 'a private key');
|
||||
m.servers.main.obf.jc = '7';
|
||||
eq(awg.config_fingerprint(m, dev), f, 'another junk count');
|
||||
m.servers.main.port = 51821;
|
||||
ok(awg.config_fingerprint(m, dev) != f, 'another port');
|
||||
eq(awg.config_fingerprint(m, null), null, 'no device');
|
||||
});
|
||||
Reference in new issue
Block a user