Dawnline 0.17.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

- Redraw the admin's charts in the connection map's style: the live speed as lines, the last 30 days and a device's week as stacked download and upload bars, a device's days as a strip, data use as meters.
- Read any chart point by point with the pointer, a tap or the arrow keys; a day's tooltip compares it with the average and shows its download and upload.
- Show where a data limit leads at the recent pace: the week ahead on the meter, and when the limit fills or what a monthly one reaches by the reset.
- Make Speed now live, one point a second, on a person's page, in the People list and in an online person's card.
- Name every place an online person's devices connect from, and the city each device connects from now.
- Portal: read the month and the week by tap or arrow keys, see how a day compares with the others, the pace toward the data limit and how long the allowed hours still run.
- Send VPN clients' DNS to the LAN's DNS after its interceptors, so transparent proxies such as forkop also handle their lookups.
This commit is contained in:
Aemeath committed 2026-11-02 09:48:31 +03:00
1 parent b0d9982796
commit 18e3013047
50 files changed
+1683 -425

No files matched your search

+3
View File
@@ -51,6 +51,9 @@ table inet dawnline {
chain dns {
type nat hook prerouting priority dstnat - 5; policy accept;
iifname { "awghome", "awgwork" } ip saddr @dns_real meta l4proto { tcp, udp } th dport 53 dnat ip to 169.254.77.2:53
}
chain dns_lan {
type nat hook prerouting priority dstnat + 5; policy accept;
iifname "awghome" ip daddr 10.9.0.1 meta l4proto { tcp, udp } th dport 53 dnat ip to 192.168.1.250:53
iifname "awgwork" ip daddr 10.9.1.1 meta l4proto { tcp, udp } th dport 53 dnat ip to 192.168.1.1:53
}
+7 -5
View File
@@ -1,5 +1,5 @@
// dawnline.meter: the point between two samples (each server's bytes per
// second), the sample taken from a dump, the two minutes kept, and the file
// dawnline.meter: the point between two samples (each server's and each
// moving device's bytes per second), the sample taken from a dump, the two minutes kept, and the file
// the watcher writes and the RPC reads (in RUN_DIR, removed after).
import * as meter from 'dawnline.meter';
import { stat, unlink } from 'fs';
@@ -14,13 +14,15 @@ test('point', () => {
// d_2 sent nothing; d_3's peer was added again (counters from zero); d_4 is new; d_5 moved to s_1.
dev: { d_1: [ 3000, 12000, 's_1' ], d_2: [ 500, 500, 's_1' ], d_3: [ 100, 300, 's_1' ], d_4: [ 10, 10, 's_1' ], d_5: [ 50, 50, 's_1' ] },
};
eq(meter.point(a, b), { ts: 5001, servers: { s_1: [ 2000, 10000 ], s_2: [ 0, 0 ] } },
'bytes per second of each server\'s devices together; a server read with nothing moving is 0');
eq(meter.point(a, b), { ts: 5001, servers: { s_1: [ 2000, 10000 ], s_2: [ 0, 0 ] }, dev: { d_1: [ 2000, 10000 ] } },
'bytes per second of each server\'s devices together; a server read with nothing moving is 0; only devices that moved');
eq(meter.point(a, { ...b, t: 102.0 }).dev, { d_1: [ 1000, 5000 ] }, 'a device over two seconds');
eq(meter.point(a, { ...b, t: 102.0 }).servers.s_1, [ 1000, 5000 ], 'over two seconds');
eq(meter.point(a, { ...b, t: 100.0 }), null, 'no time passed');
eq(meter.point(a, { ...b, t: 110.0 }), null, 'the watcher stalled');
eq(meter.point(a, { ...b, servers: [ 's_2' ], dev: { d_5: [ 50, 50, 's_2' ] } }).servers, { s_2: [ 50, 50 ] }, 'only servers read in the newer sample');
eq(meter.point({ ...a, dev: {} }, b).servers, { s_1: [ 0, 0 ], s_2: [ 0, 0 ] }, 'a first look at every device: nothing yet');
eq(meter.point({ ...a, dev: {} }, b).dev, {}, 'and no device either');
});
test('sample', () => {
@@ -37,7 +39,7 @@ test('sample', () => {
});
test('keep', () => {
let pt = (ts) => ({ ts: ts, servers: { s_1: [ ts, 0 ] } });
let pt = (ts) => ({ ts: ts, servers: { s_1: [ ts, 0 ] }, dev: { d_1: [ ts, 0 ] } });
let ring = [];
for (let ts = 1000; ts < 1000 + meter.POINTS + 5; ts++)
meter.keep(ring, pt(ts));
+1 -1
View File
@@ -1,6 +1,6 @@
// dawnline.nft: the access table rendered for a model with two servers (one
// sending everyone like a home device, one direct) and the router read as a
// fixed context: exactly what 0.13.0 renders (fixtures/nft-table.txt, made by
// fixed context: what 0.13.0 rendered (fixtures/nft-table.txt, made by
// that version from this model).
import { readfile } from 'fs';
import * as nft from 'dawnline.nft';