Show the public addresses and offer a speed test #16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The network pane knows the local address, the gateway and the
resolvers, but not how the machine looks from outside.
Wanted: public IPv4 and IPv6, and a button that measures the
line.
Notes from looking:
(myip.opendns.com against resolver1/resolver2), no HTTP
involved. dig is another undeclared dependency, like jq: it
belongs in the manifest whichever way this goes.
librespeed-cli is not in the repositories. Omarchy avoids the
dependency by measuring with curl against Cloudflare, one
direction at a time.
elsewhere, and a measurement that vanishes with it is worth
little, so the last result and when it was taken belong in the
service.
Implemented in
b66ae2e.donbox network public asks a resolver for the address it was
asked from, both families, one packet each. donbox network speed
saturates the line with parallel transfers and reads the
interface counters, Omarchy's idea, borrowed with credit and
written here rather than copied. Cloudflare's endpoints need no
token and no API call, so nothing was installed for it.
In the pane: both public addresses join the Addresses list with
the same copy button, and a Speed section carries a Measure chip,
the two readings and the time the reading was taken. The reading
lives in the service, so it survives the pane closing.
NetworkThroughputRow became NetworkStreamRow with its streams
settable, since live throughput and a measured speed are the
same two readings.
Measured for real here at roughly 640 down and 100 up, and the
suite covers the command against stubs: both addresses, both
directions, an idle line reading zero rather than nothing, and
an unreadable counter failing loudly. That last one was a real
bug: set -e is suspended inside anything on the left of ||, so
a failed measurement had been printing an empty reading and
exiting 0.
bind-utils and jq are declared in the manifest now. jq had been
undeclared since the theme was written.
Confirmed working.