Skip to content

Network panel: show public IP and country behind VPN/proxy - #20738

Open
DR0P-database wants to merge 2 commits into
omacom:quattrofrom
DR0P-database:network-public-ip-country
Open

DR0P-database wants to merge 2 commits into
omacom:quattrofrom
DR0P-database:network-public-ip-country

Conversation

@DR0P-database

@DR0P-database DR0P-database commented Nov 29, 2026 •

Copy link
Copy Markdown

Showing the actual public IP and country (with flag and ISO code) lets users verify their active exit IP and location directly from the Network panel.

What changes

Adds Public IP and Country rows (both click-to-copy) below IP Address / Gateway in the Network panel's connection details grid.

Why

When traffic is routed through a VPN, TUN interface (e.g., Xray/WireGuard/Tailscale), or a local proxy app, the existing IP Address field only shows the local/tunnel interface address (such as 172.19.0.1).

How

  • Adds bin/omarchy-network-public-ip, which queries fixed HTTPS endpoints (ifconfig.co, api.ip.sb, ipwho.is, get.geojs.io, api.country.is) with strict timeouts, response size limits, IP/ISO validation, and markup sanitization.
  • Respects both TUN-based VPN default routes and configured system proxies (HTTPS_PROXY/ALL_PROXY/HTTP_PROXY, systemctl --user environment, and org.gnome.system.proxy manual mode).
  • Localizes country names offline via system iso-codes (iso_3166-1) matching the active Omarchy UI language.
  • Defers the probe in shell/plugins/panels/network/Panel.qml until fresh route details arrive, deduplicates unchanged polls, discards stale in-flight results on route/IP/language change, clears state on close/offline/restricted links, and never polls in the background while closed.
  • Adds English shell i18n keys to default/i18n/en/shell.json.

Verification

  • LC_ALL=C ./test/cli — passed
  • bash test/shell.d/network-test.sh — passed (added Model.js parsing/sanitization/formatting tests and omarchy-network-public-ip CLI tests)
  • bash test/shell.d/network-panel-runtime-test.sh — passed (added public-ip QML runtime fixture covering deferred probe, unchanged-route deduplication, mid-flight route switch invalidation, failure handling, and offline reopen)
  • bash test/shell.d/i18n-test.sh — passed
  • bash test/shell.d/panel-open-budgets-test.sh — passed (omarchy.network: 61ms first open, 36ms reopen)

Screenshots

image

@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The changes appear safe to merge; both previous findings are addressed.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes appear safe to merge; both previous findings are addressed.

Summary

Adds public IP and country rows to the Network panel, backed by a helper that checks external services through the configured VPN or proxy.

  • The lookup command returns the public IP and available country details for the active connection.
  • The Network panel shows copyable public IP and country details for the active connection.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Panel opens] --> B[Fresh route details arrive]
  B --> C{Route changed or result expired?}
  C -->|Yes| D[Start public IP lookup]
  D --> E{Request still current?}
  E -->|No| F[Discard result]
  E -->|Yes| G{Lookup succeeded?}
  G -->|Yes| H[Show IP and country]
  G -->|No| I[Retry with increasing delay]
  I -->|Up to three retries| D
  J[Panel closes or link becomes restricted] --> K[Clear values and stop retries]
Loading

Reviews (2) · Last reviewed commit: "Network panel: expire open-panel public ..." · Reviewed by Greptile

Comment thread shell/plugins/panels/network/Panel.qml Resolved
Comment thread shell/plugins/panels/network/Panel.qml Resolved
@chessing234

Copy link
Copy Markdown
Contributor

both of your commits are in #21016. public IP and country are in the details grid, which is still one pair per row on a narrow panel. the route monitor from #20708 was kept in front of that probe. the parser checks in network-test.sh passed here. @dhh @omarchybot if 21016 lands, this can close as superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants