diff --git a/ckpool/config/ckpool.conf.template b/ckpool/config/ckpool.conf.template index f9d0334..a32feeb 100644 --- a/ckpool/config/ckpool.conf.template +++ b/ckpool/config/ckpool.conf.template @@ -12,7 +12,8 @@ "blockpoll": ${BLOCKPOLL_MS}, "update_interval": ${UPDATE_INTERVAL_S}, "serverurl": [ - "0.0.0.0:${STRATUM_PORT}" + "0.0.0.0:${STRATUM_PORT}", + "127.0.0.1:${TLS_INTERNAL_PORT}" ], "mindiff": ${MINDIFF}, "startdiff": ${STARTDIFF}, diff --git a/ui/src/format.ts b/ui/src/format.ts index f9e394d..249d8f5 100644 --- a/ui/src/format.ts +++ b/ui/src/format.ts @@ -63,6 +63,25 @@ export function formatAgo(unixSeconds: number): string { return `${Math.floor(ageSec / 86400)}d ago`; } +// Open-source ASIC hardware (Bitaxe family, NerdMiner, etc.) and +// open-source firmware projects (Braiins OS, cgminer/bfgminer/ +// ckminer). Used to render a star next to the hardware label, like +// public-pool does, so visitors can spot DIY / OSS rigs at a glance. +export function isOpenSource(ua: string): boolean { + if (!ua) return false; + const s = ua.toLowerCase(); + return /bitaxe|nerdaxe|nerdqaxe|nerdoctaxe|nerdminer|qaxe|mccm|lucky|braiins|cgminer|bfgminer|ckminer|esp32/.test(s); +} + +// Extract the BTC payout address from a stratum username. Stratum +// usernames in solo mode are "" or ".label". +// ckpool stores this verbatim in the worker name. +export function btcAddressOf(workername: string): string { + if (!workername) return ""; + const dot = workername.indexOf("."); + return dot < 0 ? workername : workername.slice(0, dot); +} + // Detect common Bitcoin mining hardware from the stratum useragent // string. This is a best-effort heuristic; unknown agents fall back // to a stripped version of the raw string. Order matters — check diff --git a/ui/src/lib/MinersTable.svelte b/ui/src/lib/MinersTable.svelte index a887904..826aedb 100644 --- a/ui/src/lib/MinersTable.svelte +++ b/ui/src/lib/MinersTable.svelte @@ -1,27 +1,43 @@