Recognize Bitaxe user agent

This commit is contained in:
Dorian
2026-05-09 16:56:44 +01:00
parent 4064e16ea8
commit 641a086d62
2 changed files with 6 additions and 2 deletions

View File

@@ -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();

View File

@@ -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",