Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
1599e6b
feat(net): recognise eMuleAI peer capabilities and demux reserved frames
aruizdesamaniego-sh Aug 23, 2026
3f5661e
test(net): pin the eMuleAI vendor tag ids and Kad tag names as literals
aruizdesamaniego-sh Sep 4, 2026
d7ce428
fix(peer-capabilities): rename ToWire() to KnownBits()
aruizdesamaniego-sh Aug 30, 2026
a58534e
i18n: regenerate the catalogues for the capability display strings
aruizdesamaniego-sh Sep 4, 2026
179f7df
fix(gui): read the peer capabilities through ClientDetailInfo
aruizdesamaniego-sh Sep 4, 2026
f5aa253
docs(protocol): name the vendor bits the known mask drops
aruizdesamaniego-sh Sep 4, 2026
1cf620e
feat(gui): spell the protocol extension names out and translate them
aruizdesamaniego-sh Sep 4, 2026
5f93381
feat(gui): rename the capability row and hide it when it is empty
aruizdesamaniego-sh Sep 4, 2026
cd20d6a
i18n: regenerate the catalogues for the protocol extension strings
aruizdesamaniego-sh Sep 4, 2026
552e390
fix(protocol): read 0xA0 as the buddy's IPv6 and stop reading 0xAF at…
aruizdesamaniego-sh Sep 5, 2026
237d6dd
feat(protocol): recognise CT_MOD_YOUR_IP, and corroborate it before b…
aruizdesamaniego-sh Sep 5, 2026
405c18b
feat(webapi): publish the peer capability word as protocol_extensions
aruizdesamaniego-sh Sep 5, 2026
c2e7151
fix(ec): move EC_TAG_CLIENT_MOD_CAPABILITIES off a taken code
aruizdesamaniego-sh Sep 5, 2026
90cf419
style(webapi): reformat the client event serialiser
aruizdesamaniego-sh Sep 5, 2026
4f7834b
fix(tests): link PublicIPv6CorroborationTest against mulecommon
aruizdesamaniego-sh Sep 5, 2026
30fafcc
style(protocol): emplace the corroboration candidate
aruizdesamaniego-sh Sep 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/EC_Protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,3 +624,30 @@ from the session's absence in the next `EC_OP_CHAT_SESSIONS` reply.
> gigabit connections. EC clients reading these tags should use
> `GetInt()` (which handles any integer width); clients sending them
> should encode them as 32-bit values.

### Peer vendor capabilities (`EC_TAG_CLIENT_MOD_CAPABILITIES = 0x0632`)

| Tag | Code | Type | Description |
| -------------------------------- | -------- | -------- | ----------- |
| `EC_TAG_CLIENT_MOD_CAPABILITIES` | `0x0632` | `uint32` | Peer's eMuleAI vendor capability bitfield |

A child of `EC_TAG_CLIENT`, carrying what the peer advertised in the
eD2k handshake tag `CT_MOD_MISCOPTIONS` (`0xAA`):

| Bit | Meaning |
| --- | ------- |
| 0 | Extended source exchange |
| 1 | Legacy uTP NAT traversal |
| 2 | IPv6 |
| 3 | Serving-buddy pull |
| 4 | QUIC NAT traversal |

Bits 5 and above are reserved. The core masks them off before sending,
so an EC client never has to know which bits are defined — a set bit it
does not recognise cannot reach it.

The tag is additive and follows the usual convention: a reply without it
means an older daemon, which is a **third state**, distinct from a peer
that advertised no capabilities (word `0`). aMule itself advertises
nothing here yet — it implements none of the five features — so the tag
describes the peer only.
3 changes: 2 additions & 1 deletion docs/api/EVENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,12 @@ Identical to the REST [`/api/v0/clients`](REFERENCE.md#get-apiv0clients) list-it
"upload_queue_score": 150,
"obfuscation_state": "enabled",
"connected": true,
"protocol_extensions": 0,
"friend_slot": false,
"part_progress_percent": 75.0
}
```
Carries the same field set as the [`/clients`](REFERENCE.md#get-apiv0clients) list row, including `source_origin`, `parts_offered_count`, `client_mod_name` and `shared_files_browsable`.
Carries the same field set as the [`/clients`](REFERENCE.md#get-apiv0clients) list row, including `source_origin`, `protocol_extensions`, `parts_offered_count`, `client_mod_name` and `shared_files_browsable`.

`part_progress_percent` follows the same rule as on the REST row: it is how much of the file we are downloading **from** this client the client already holds, and it is `null` when there is no such file, rather than sent as a negative sentinel. It is derived from `parts_offered_count` and the linked download's part count, so it moves when `parts_offered_count` does, and goes back to `null` if that download goes away. The key is always present -- see [REFERENCE.md's unknown-value rule](REFERENCE.md#unknown-values), under which `null` means "no value" and an absent key means "not reported".

Expand Down
6 changes: 6 additions & 0 deletions docs/api/REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,7 @@ curl -s -H "Authorization: Bearer $TOKEN" \
"upload_queue_score": 150,
"obfuscation_state": "enabled",
"connected": true,
"protocol_extensions": 0,
"friend_slot": false,
"source_origin": "kad",
"parts_offered_count": 42,
Expand Down Expand Up @@ -1304,6 +1305,10 @@ Every one of them falls back to `"unknown"` for a code the daemon does not map,

`connected` says whether a socket to this peer is up right now. A row existing in this list does not answer that: the daemon holds a client object from the first contact attempt, so a peer it is still trying to reach - or can never reach - appears here with `connected: false`. It is `null` on a daemon that does not report peer connectivity. The `online` fields on [`GET /friends`](#get-apiv0friends), [`GET /chats`](#get-apiv0chats) and [`GET /known_clients`](#get-apiv0known_clients) are the same fact reached by their own keys.

`protocol_extensions` is the peer's eMuleAI vendor capability word, taken verbatim from `EC_TAG_CLIENT_MOD_CAPABILITIES` — the same value the desktop GUI renders as its *Protocol extensions* row. It is a bitfield, not one of the enumerated tokens above, because a peer claims any combination of the bits rather than one state: `0x01` extended source exchange, `0x02` uTP NAT traversal, `0x04` IPv6, `0x08` serving-buddy pull, `0x10` QUIC NAT traversal. The daemon has already cleared every bit it does not define, so a bit set here is one aMule names; a bit aMule does not name reads as absent, not as unknown. `0` means the peer claimed nothing, which is what nearly every peer on the network does — a peer that sent no capability tag and one that sent an all-zero word are the same state on the wire and report the same here.

It says what the *peer* supports, never what this daemon does: aMule implements none of these extensions yet and advertises none of them back, so the field is recognition only. The bit meanings are wire format shared with eMuleAI and are defined in `src/PeerCapabilities.h`.

`country_code` is the client's ISO 3166-1 alpha-2 country code (lowercase, e.g. `"de"`), resolved server-side from the client IP by the daemon's GeoIP database. It is `null` when GeoIP is disabled or unsupported by the build, or when the IP does not resolve — render the flag and localized country name client-side from the code. The flag image is served by [`GET /flags/{code}.png`](#get-flagscodepng); the localized name has no endpoint because the browser already has it (`Intl.DisplayNames` with `{ type: "region" }`).

**Errors:** `400 bad_request` (unknown filter token), `503 ec_unavailable`.
Expand Down Expand Up @@ -1351,6 +1356,7 @@ curl -s -H "Authorization: Bearer $TOKEN" \
"upload_queue_score": 150,
"obfuscation_state": "enabled",
"connected": true,
"protocol_extensions": 0,
"friend_slot": false,
"ed2k_user_id": 3232238090,
"high_id": true,
Expand Down
1 change: 1 addition & 0 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ src/PartBarLegendUI.cpp
src/PartFileConvert.cpp
src/PartFileConvertDlg.cpp
src/PartFile.cpp
src/PeerCapabilities.h
src/Preferences.cpp
src/PrefsUnifiedDlg.cpp
src/SearchDlg.cpp
Expand Down
26 changes: 25 additions & 1 deletion po/amule.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: aMule GIT\n"
"Report-Msgid-Bugs-To: https://github.com/amule-org/amule/issues\n"
"POT-Creation-Date: 2026-09-05 12:01+0200\n"
"POT-Creation-Date: 2026-09-05 15:02+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -4018,6 +4018,10 @@ msgstr ""
msgid "Obfuscation"
msgstr ""

#: src/muuli_wdr.cpp
msgid "Protocol extensions:"
msgstr ""

#: src/muuli_wdr.cpp
msgid "Transfers to client"
msgstr ""
Expand Down Expand Up @@ -5767,6 +5771,26 @@ msgstr ""
msgid "ERROR: Failed to open partfile '%s'"
msgstr ""

#: src/PeerCapabilities.h
msgid "Extended source exchange"
msgstr ""

#: src/PeerCapabilities.h
msgid "NAT traversal (uTP)"
msgstr ""

#: src/PeerCapabilities.h
msgid "IPv6"
msgstr ""

#: src/PeerCapabilities.h
msgid "Buddy info pull"
msgstr ""

#: src/PeerCapabilities.h
msgid "NAT traversal (QUIC)"
msgstr ""

#: src/Preferences.cpp
msgid "System default"
msgstr ""
Expand Down
Loading
Loading