- Read
EMULEBB_WORKSPACE_ROOT\repos\emulebb-tooling\docs\WORKSPACE-POLICY.mdfirst; it is authoritative for workspace-wide rules. - Start from
EMULEBB_WORKSPACE_ROOT\repos\emulebb-tooling\docs\reference\AGENT-CHECKLIST.mdfor the repeatable operating path.
Everything below is this repo's local guidance for the eMuleBB-maintained libtorrent fork.
- This is
emulebb-libtorrent, a fork ofarvidn/libtorrenttracked on branchRC_2_0(libtorrent 2.0.x). It is the BT engine under qBittorrentBB and is tuned for the BB world: VPN-first egress correctness and a DHT-harvester-friendly engine. - The exact delta over upstream (owned files, shared seams, features, rebase
workflow) is described in
fork-delta.json— keep it current when the delta changes.
- Stay additive and close to upstream. Prefer new files (
stun.*,http_ip_probe.*,dns_resolver.*) over edits to shared files; when a shared seam must change, keep it minimal so upstream rebases stay conflict-driven. - ABI is append-only. New
settings_pack(str/int/bool) andalert_typesentries go at the END (beforemax_*_setting_internal; bumpnum_alert_typeswithinabi_alert_count). Never reorder or remove enum entries. - No AI/Claude/Anthropic attribution in commits, code, or docs.
- Tracked text is LF.
- Build ONLY under
%EMULEBB_WORKSPACE_OUTPUT_ROOT%(never this tree, neverc:\prj). Generator: VS 2022 + vcpkg toolchain (x64-windows). - Install for qBittorrentBB to consume with
cmake --install <build> --config Release --prefix <out>\deps\libtorrent— the default prefix wrongly targetsC:\Program Files\libtorrent, always pass--prefix. After installing, copy the freshtorrent-rasterbar.dllnext to the runningqbittorrent.exe.
- The egress hardening (L1-L5), the bound DNS resolver, and the VPN egress guard
exist so BT/DHT traffic cannot leave outside the VPN tunnel. On Windows a plain
bind()does NOT pin the egress NIC (weak host model) —IP_UNICAST_IFdoes. - Validate egress changes with the qBittorrentBB live-wire harness
(
qbittorrentbb/test/livewire/vpn_guard_test.py): it asserts ALLOW (clean) and LEAK (fail-closed) end to end against the live tunnel.
.github/workflows/nightly-upstream.ymlchecksupstream/RC_2_0nightly and pushes a rebasedautomation/upstream-nightlybranch only when upstream moved and the rebase is clean. It does NOT run the heavy C++/Qt build or touchRC_2_0— a human/local build validates before fast-forwardingRC_2_0.