identifyClient

Map a 20-byte peer-id to a human-readable client name and version: the port of libtorrent's identify_client (aux::identify_client_impl).

Resolution order is identical to libtorrent:

  1. all-zero peer-id → "Unknown".

  2. the non-standard GenericMappings table (offset + literal-prefix matches).

  3. the bespoke special cases: Bits on Wheels, eXeem, the two Experimental builds.

  4. Azureus style, then Shadow style, then Mainline style, each rendered via the two-letter-code lookup table.

  5. first-12-bytes-zero → "Generic".

  6. otherwise "Unknown [....]" with non-printable bytes shown as '.'.

Return

a display string; never null (unrecognised ids fall through to "Generic" or "Unknown [...]").

Parameters

peerId