Skip to content

Fix adapter selection on Windows (#2) - #3

Merged
revlat merged 1 commit into
mainfrom
fix/windows-adapter-selection
Jul 8, 2026
Merged

revlat merged 1 commit into
mainfrom
fix/windows-adapter-selection

Conversation

@revlat

@revlat revlat commented Jul 8, 2026

Copy link
Copy Markdown
Owner

On Windows, Npcap reports interfaces as opaque \Device\NPF_{GUID} paths instead of friendly names. This made -i unusable (no way to know the name, no way to list adapters) and broke auto-detection, whose Name != "lo" loopback filter never matches on Windows.

  • Add -l/--list to enumerate interfaces with index, name, description and IPv4 addresses.
  • Accept -i by exact name, index from --list, or description substring, with clear errors for ambiguous/out-of-range/no-match cases.
  • Harden auto-detection: detect loopback via pcap flag and description (not just the name "lo"), skip APIPA/link-local adapters, and prefer the interface with a routable IPv4 address.
  • Add unit tests covering the Windows adapter scenario.

On Windows, Npcap reports interfaces as opaque \Device\NPF_{GUID} paths
instead of friendly names. This made `-i` unusable (no way to know the
name, no way to list adapters) and broke auto-detection, whose `Name != "lo"`
loopback filter never matches on Windows.

- Add `-l`/`--list` to enumerate interfaces with index, name, description
  and IPv4 addresses.
- Accept `-i` by exact name, index from --list, or description substring,
  with clear errors for ambiguous/out-of-range/no-match cases.
- Harden auto-detection: detect loopback via pcap flag and description
  (not just the name "lo"), skip APIPA/link-local adapters, and prefer the
  interface with a routable IPv4 address.
- Add unit tests covering the Windows adapter scenario.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@revlat
revlat merged commit 824d06e into main Jul 8, 2026
5 checks passed
@revlat
revlat deleted the fix/windows-adapter-selection branch July 8, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant