Skip to content

RUST-FEAT-148 - Serve and browse eD2K peer shared-file lists #376

In progress

Description

@itlezy

Beta 3 requires bidirectional browsing against stock eMule and aMule. Serve flat and directory views with Everyone as the fresh-profile default, verified Friends, and Off. Make the existing REST and WebUI browse action fetch bounded peer results. Cover capability advertising, safe virtual directory names, and a 100,000-file catalog.

Compare behavior with stock eMule ac3d52e and amule-org aMule c5989ec4a. Use #164 for deterministic protocol evidence and #31 for same-revision interoperability.

Roadmap placement is Beta 3 Client gate.

Verified native Windows browsing

Rust 99d9111 passed all four native browse directions in one run with instrumented stock eMule c547b7cf and official aMule 3.0.1 02db0d7fa. Both native clients found the unrequested Rust canary. Stock displayed its filename, byte size and eD2K hash. aMule received the directory and file-list replies and saved matching filename, size and eD2K hash in native download metadata after the file was chosen from its browse results. The same Rust revision passed Windows REST/OpenAPI verification.

See #31 for the case IDs and exact companion revisions. This issue stays open through integration.

Catalog and authorization evidence

The 100,000-file Rust tests exercise the outgoing directory planner (196 groups, 512 files per full group) and incoming buffered pagination (100,000 rows across ten synthetic replies). The four native Windows directions exercise the peer listing against stock and aMule on a small fixture. Neither result establishes native behavior at the large-catalog boundary.

Rust publishes synthetic directory names and requires an enrolled signing key to be verified for the current session in Friends mode. Stock and amule-org aMule publish public directory aliases and their browse handlers call IsFriend(). Stock advertises the incomplete-files alias when its download queue is nonempty. aMule advertises it even for an empty queue. Rust counts the rows emitted to a peer. The amule-org directory handler counts files before excluding large files for a legacy peer, which can leave its count larger than the number of emitted rows. Keep these policy and legacy edge cases distinct from the four native directions.

The Rust source is in ed2k_tcp/browse/catalog.rs, browse/requests.rs, browse.rs and codec/shared_browse.rs. The reference implementations are in stock BaseClient.cpp and ListenSocket.cpp and aMule BaseClient.cpp and ClientTCPSocket.cpp at the revisions above.

Published PR-head rerun

On PR #394 at Rust 5e1b225, stock eMule passed both directions and Rust browsing aMule completed. The reverse aMule UI check stopped when the Windows desktop disconnected. The prior implementation revision retains the four successful directions. See #31 for the exact receipts and rerun condition.

Add a registered Rust workstream test that enumerates a 100,000-file publisher over the wire and validates every unique filename, size, and hash. The current stress runner starts a legacy GUI profile and reads declared row counts. A separate native large-catalog run would establish what the stock and aMule browser UIs actually expose.

Stock browse rerun on c958086

Both stock eMule browse directions passed on PR #394 at c958086. The reverse result matched the 4,096-byte canary's name and eD2K hash. Both independent clients also delivered separate verified 10 MiB transfers. The current aMule browse run still needs a connected Windows desktop. See #31 for the executable digest and case receipts.

Four native browse directions on c0bef3d

Rust c0bef3d, diagnostics SHA-256 6deab4620e2d87c3fc316153c489f52ba7ab014b67e9195dbc2487168678838c, passed both directions against stock eMule and frozen aMule 3.0.1. Build Tests 29450d0d1e75ac182614a55dcfae6fbae657ef80 ran both cases. Both Rust requester cases finished. The stock requester returned RustBrowseCanary.bin with 4,096 bytes and eD2K hash 851c64c0aabddf809e5e3f5e41e3f153. The aMule requester saved RustBrowseCanary.bin with 137 bytes and eD2K hash 67d97a63b73183eae6a6e75eb359bbcb in native download metadata.

Receipts are reports/multi-client-p2p-matrix/20261126T075943Z-emulebb-main-release-11668/a7 and reports/multi-client-p2p-matrix/20261126T080213Z-emulebb-main-release-15272/e4. These runs use a small catalog.

Complete 100,000-row TCP fixture

The test-only review commit 80790e0 adds listener_and_requester_browse_one_hundred_thousand_files_over_tcp. The fixture creates synthetic catalog metadata, admits the paths through the production root-membership transaction, and uses the production listener plus requester browse registry over a real TCP connection. It observes the explicit oversized-flat denial, then receives 196 directory replies. Every reply fits the wire limit. The requester reaches Complete and validates every filename, byte size, eD2K hash and directory in 512-row pages. The registered Windows eD2K suite passed all 1,568 tests.

Stock eMule ac3d52e (ListenSocket.cpp OP_ASKSHAREDFILESDIR) and amule-org c5989ec4a (ClientTCPSocket.cpp OP_ASKSHAREDFILESDIR) return one frame per advertised directory. Test native large catalogs with bounded per-directory replies in each direction. A single native 100,000-file directory exceeds Rust's 2,000,000-byte frame limit, even though the total-result limit is 100,000. This fixture covers the Rust virtual-directory wire path and leaves native large-catalog and oversized native-directory behavior open.

Observed transfer progress during native browse

The c0bef3d native browse receipts carry clear TCP packet events on the requesting Rust connection. In e4, diagnostic sequence 55 starts directory browsing and sequence 66 receives the final directory reply. Six accepted OP_SENDINGPART frames totaling 61,440 payload bytes arrived from the same peer in that interval. In a7, sequences 58 through 69 contain four accepted part frames totaling 40,960 bytes. Neither interval contains a reconnect. Both 10 MiB downloads completed with byte verification.

This proves progress during the small native browse on both reference connections. The 100,000-file TCP fixture proves complete enumeration. The native large-catalog run still needs transfer-progress and timing evidence at that scale.

Native browse and transfers on the current review head

Rust 80790e0, diagnostics SHA-256 c7f20fc016f1a1394abd109307113841278d2fa2697e2668b3afc9969e43aabd, passed peer browsing in both directions against stock eMule and frozen aMule 3.0.1. The stock requester matched RustBrowseCanary.bin at 4,096 bytes with eD2K hash 851c64c0aabddf809e5e3f5e41e3f153. The aMule requester recorded the matching filename, 137 bytes, and eD2K hash 67d97a63b73183eae6a6e75eb359bbcb in native download metadata. Rust verified both 10 MiB payloads byte for byte.

Build Tests 29450d0d1e75ac182614a55dcfae6fbae657ef80 produced the receipts under reports/multi-client-p2p-matrix/20261126T081630Z-emulebb-main-release-17716/e4 and reports/multi-client-p2p-matrix/20261126T081707Z-emulebb-main-release-17716/a7. This head also passes the 100,000-file Rust TCP fixture and all 1,568 tests in the registered Windows eD2K suite.

Transfer progress on the current review head

Retained Rust 80790e0 diagnostics show five accepted part frames carrying 51,200 file bytes between the first directory request and last directory reply from stock eMule (sequence 56–66, 46 ms). The aMule interval contains four accepted part frames carrying 40,960 file bytes (sequence 59–70, 135 ms). Both cases use the same native download connection for browse and file parts, then complete their byte-verified 10 MiB download. The trace intervals are observations for the small catalog.

Native scale acceptance

Use the registered deterministic two-client matrix with synthetic files in explicitly shared native leaf directories. The existing browse-stress generator can make 271 directories of 369 files. Include the transfer fixture for exactly 100,000 visible files. Wait for the native local catalog to finish hashing before connecting the browse requester. Server offer count cannot establish native peer-visible readiness. The existing one-file readiness check and first 200 REST rows do not establish a complete catalog.

Page every browse result and compare filename, byte size, eD2K hash and directory against the fixture. Record whether the exact download connection receives accepted file bytes between its first browse request and last browse reply, record elapsed time, and keep the final SHA-256 comparison. Exercise the reverse direction with a native requester and retain evidence of what the native client actually lists. Preserve the small-catalog test as the independent baseline.

Stock eMule and current aMule both impose a 2,000,000-byte TCP payload limit. Both emit one uncompressed file-list reply per requested directory. Use bounded leaves for the full-catalog success case. Exercise one oversized native directory separately and verify that an incomplete result never appears complete. Stock handler · aMule handler · aMule receive limit

Stock paged native result

The local Build Tests workstream exercised the native stock publisher with two 369-file directories and the transfer fixture. Rust 80790e0 verified all 739 browse rows by name, size, eD2K hash and directory across multiple REST pages. The same download received 40,960 file bytes from the stock peer between its browse request and last reply (sequence 52–65, about 93 ms). The 32 MiB transfer completed with payload verification. Receipt is reports/multi-client-p2p-matrix/20261126T083121Z-emulebb-main-release-10028/e4. This qualifies the paged stock fixture and measurement path. The native 100,000-file runs are still open.

Activity

  1. added
    enhancement
    rust
    beta3-blocker
    on Nov 25, 2026
  2. moved this from Todo to In Progress in eMuleBB Roadmapon Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    beta3-blockerenhancementrust

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions