dash(web): --external-ip override for the dashboard Stratum URL (NAT/port-mapped nodes)#795
Merged
Merged
Conversation
…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
force-pushed
the
dash/web-external-ip-override
branch
from
July 22, 2026 04:16
5438889 to
fce2a2b
Compare
frstrtr
marked this pull request as ready for review
July 22, 2026 04:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
--external-ip ADDR(aliases--stratum-advertise/--public-host) tomain_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.xbehind 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 withmain_ltc.cpp:1626. No core change;rest_node_info()already servesexternal_ip.0.0.0.0sentinel → dashboard keeps its auto-detect /window.location.hostnamefallback. No regression.Web layer only, non-consensus.
Tests
Two safe-additive KATs pin the flag → served-
external_ipplumbing (unset honest-absent; operator host served verbatim). Both pass;c2pool-dashbuilds green locally.