Skip to content

dash(web): --external-ip override for the dashboard Stratum URL (NAT/port-mapped nodes)#795

Merged
frstrtr merged 1 commit into
masterfrom
dash/web-external-ip-override
Jul 22, 2026
Merged

dash(web): --external-ip override for the dashboard Stratum URL (NAT/port-mapped nodes)#795
frstrtr merged 1 commit into
masterfrom
dash/web-external-ip-override

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 21, 2026

Copy link
Copy Markdown
Owner

What

Adds --external-ip ADDR (aliases --stratum-advertise / --public-host) to main_dash, overriding the miner-facing host rendered in the dashboard Stratum URL card (nodeInfo.external_ip).

Why

On a node that NATs out through a shared gateway (both hotel DASH nodes sit on LAN 192.168.1.x behind one gateway), the auto-detected outbound IP is not the address miners dial — they reach the external-mapped hosts. The Stratum URL then advertised the wrong NAT IP. This lets the operator advertise the true miner-facing host.

How

Feeds the existing MiningInterface::set_external_ip() seam — exact parity with main_ltc.cpp:1626. No core change; rest_node_info() already serves external_ip.

  • Unset (default): serves the honest-absent 0.0.0.0 sentinel → dashboard keeps its auto-detect / window.location.hostname fallback. No regression.
  • Set: serves the operator-advertised host verbatim.

Web layer only, non-consensus.

Tests

Two safe-additive KATs pin the flag → served-external_ip plumbing (unset honest-absent; operator host served verbatim). Both pass; c2pool-dash builds green locally.

…port-mapped nodes)

The dashboard Stratum-URL card renders nodeInfo.external_ip. On a node
that NATs out through a shared gateway (both hotel DASH nodes: LAN
192.168.1.x behind one gateway), the auto-detected OUTBOUND IP is not the
address miners dial -- they reach the external-mapped hosts. Add
--external-ip (alias --stratum-advertise / --public-host) to main_dash,
feeding the existing MiningInterface::set_external_ip() seam (parity with
main_ltc.cpp:1626). rest_node_info() then serves the operator-advertised
host verbatim; unset keeps the honest-absent 0.0.0.0 sentinel so the
dashboard auto-detect / window.location.hostname fallback is unchanged
(no regression). Web layer only, non-consensus.

Regression-locks the flag -> served-external_ip plumbing with two KATs
(unset honest-absent; operator host served verbatim).
@frstrtr
frstrtr force-pushed the dash/web-external-ip-override branch from 5438889 to fce2a2b Compare July 22, 2026 04:16
@frstrtr
frstrtr marked this pull request as ready for review July 22, 2026 04:16
@frstrtr
frstrtr merged commit 547d1c0 into master Jul 22, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant