From 641a086d62c27575b02f2daaae44ac15d28ce679 Mon Sep 17 00:00:00 2001 From: Dorian Date: Sat, 9 May 2026 16:56:44 +0100 Subject: [PATCH] Recognize Bitaxe user agent --- apps/api/src/datum/parse.ts | 4 ++++ apps/api/src/datum/profiles.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/api/src/datum/parse.ts b/apps/api/src/datum/parse.ts index a24e7f3..8d59b83 100644 --- a/apps/api/src/datum/parse.ts +++ b/apps/api/src/datum/parse.ts @@ -54,6 +54,10 @@ export function matchProfile(userAgent: string, authUsername: string): MinerProf const p = MINER_PROFILES.find((x) => x.slug === "nerdqaxe"); if (p) return p; } + if (/bitaxe/i.test(userAgent)) { + const p = MINER_PROFILES.find((x) => x.slug === "bitaxe"); + if (p) return p; + } const dotIdx = authUsername.indexOf("."); if (dotIdx >= 0) { const worker = authUsername.slice(dotIdx + 1).toLowerCase(); diff --git a/apps/api/src/datum/profiles.ts b/apps/api/src/datum/profiles.ts index 75b1228..987394f 100644 --- a/apps/api/src/datum/profiles.ts +++ b/apps/api/src/datum/profiles.ts @@ -2,8 +2,8 @@ import type { MinerProfile } from "./types.js"; // Live UserAgent strings observed on this Umbrel (2026-05-06): // NerdQAxe → "NerdQAxe/BM1370/v1.0.36" (self-identifies) -// Bitaxe / Avalon Nano 3 / Avalon Mini 3 → all "cgminer/4.11.1" (indistinguishable -// by UA — match these via auth-username worker-name suffix instead). +// Bitaxe → "bitaxe/BM1368/v2.7.1" or "cgminer/4.11.1" depending on firmware +// Avalon Nano 3 / Avalon Mini 3 → "cgminer/4.11.1" (match via worker-name suffix). export const MINER_PROFILES: readonly MinerProfile[] = [ { slug: "nerdqaxe",