Show the public addresses and offer a speed test #16

Closed
opened 2026-08-16 22:59:41 +01:00 by joshquinlan · 2 comments
Owner

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:

  • dig is installed and is the cheapest lookup for both families
    (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.
  • No speed test tool is installed. Fedora has speedtest-cli;
    librespeed-cli is not in the repositories. Omarchy avoids the
    dependency by measuring with curl against Cloudflare, one
    direction at a time.
  • Results should outlive the pane. It closes on a click
    elsewhere, and a measurement that vanishes with it is worth
    little, so the last result and when it was taken belong in the
    service.
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: - dig is installed and is the cheapest lookup for both families (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. - No speed test tool is installed. Fedora has speedtest-cli; librespeed-cli is not in the repositories. Omarchy avoids the dependency by measuring with curl against Cloudflare, one direction at a time. - Results should outlive the pane. It closes on a click elsewhere, and a measurement that vanishes with it is worth little, so the last result and when it was taken belong in the service.
Author
Owner

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.

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.
Author
Owner

Confirmed working.

Confirmed working.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshquinlan/dotfiles#16
No description provided.