feat(client): require explicit TAP selection when ambiguous

Add a Windows client --tap-instance-id option for selecting a specific
TAP-Windows6 adapter by NetCfgInstanceId / InterfaceGuid. The client still opens
the only installed TAP adapter automatically, but now refuses to choose an
arbitrary adapter when multiple TAP-Windows6 adapters are present.

This keeps the MVP test run from silently configuring and opening the wrong TAP
adapter on machines that already have VPN or test TAP devices installed. The
error lists available adapter instance ids so the operator can rerun with the
intended value.

Test Plan:
- cargo fmt --check
- cargo test -p lanparty-client-win
- cargo test --workspace
- cargo clippy --workspace --all-targets -- -D warnings
- git diff --check

Refs: PLAN.md Windows client TAP adapter responsibility
This commit is contained in:
2026-05-21 23:11:01 +02:00
parent b17b6f0683
commit e619866112
4 changed files with 185 additions and 19 deletions
+15
View File
@@ -100,6 +100,21 @@ In an Administrator terminal on Windows:
--room ROOM1
```
If the Windows machine has multiple TAP-Windows6 adapters, select the intended
one explicitly:
```powershell
Get-NetAdapter | Where-Object InterfaceDescription -Like "*TAP*" |
Select-Object Name, InterfaceGuid, InterfaceDescription
.\target\release\lanparty-client-win.exe `
--relay relay.example.net:8443 `
--server-name lanparty-relay.local `
--relay-ca-cert .\relay-cert.der `
--room ROOM1 `
--tap-instance-id "{InterfaceGuid-from-the-command-above}"
```
Expected client output:
```text