Skip to content

Open PCAP files from Linux and Windows file managers - #1289

Open
SR0725 wants to merge 1 commit into
GyulyVGC:mainfrom
SR0725:fix/pcap-file-associations
Open

Open PCAP files from Linux and Windows file managers#1289
SR0725 wants to merge 1 commit into
GyulyVGC:mainfrom
SR0725:fix/pcap-file-associations

Conversation

@SR0725

@SR0725 SR0725 commented Aug 27, 2026

Copy link
Copy Markdown

This connects file-manager "Open with" actions to Sniffnet's existing PCAP import flow on Linux and Windows.

Changes:

  • accept a PCAP path as a positional CLI argument and start offline analysis
  • register application/vnd.tcpdump.pcap in the Linux desktop entry
  • register .pcap, .pcapng, and .cap in the Windows MSI
  • keep the existing --adapter startup path and reject conflicting capture sources

macOS is not included in this change. The current app bundle starts through a shell wrapper, while Launch Services delivers an open-document event instead of a file argument. Supporting that path needs a native event bridge rather than another file-association entry.

Verification:

  • cargo test — 232 passed
  • cargo clippy -- -D warnings
  • cargo fmt --all -- --check
  • cargo run -- --help
  • xmllint --noout resources/packaging/windows/setup.wxs

I could not build the Windows MSI locally from macOS, so the Windows packaging job remains the platform-specific validation for that part.

AI assistance: I used an AI coding assistant while investigating and implementing this change. I reviewed the diff and can explain each change.

Related to #1288.

@SR0725
SR0725 force-pushed the fix/pcap-file-associations branch from 15a8bac to cbf22e7 Compare August 27, 2026 19:20
@GyulyVGC GyulyVGC added the enhancement New feature, request, or improvement label Aug 27, 2026
@GyulyVGC

Copy link
Copy Markdown
Owner

Hey @SR0725 thank you!

Nice to see that implementing support for this is quite simple.
Ideally I'd like to implement support for all the first-class supported platforms (including macOS) all at once, but this can be a good starting point.

@GyulyVGC GyulyVGC added the packaging Application packaging label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, request, or improvement packaging Application packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow associating PCAP files to import them with "Open with > Sniffnet"

2 participants