The web UI provides a browser-based interface for packet analysis, useful for:
- Remote access to termshark running on a server
- Collaborative analysis with session sharing
- Live packet capture from web browser
- Enhanced visualization (graphs, charts)
- Easier copy/paste and text selection
- Mobile device access
-
sharkd: The Wireshark daemon. Usually included with Wireshark.
- Debian/Ubuntu:
sudo apt install wireshark-common - macOS: Included with Wireshark.app
- Windows: Build from source or use WSL
- Debian/Ubuntu:
-
For live capture: Root/sudo access or appropriate capabilities
# Load a pcap file
termshark --web -r capture.pcap
# Custom address (allow remote access)
termshark --web --web-addr 0.0.0.0:8080 -r capture.pcap
# Without a file (can load via UI or start capture)
termshark --web# Start with live capture on interface
termshark --web -i eth0
# With capture filter
termshark --web -i eth0 -f "port 80"Multi-session mode allows multiple users to create, join, and share analysis sessions:
# Enable multi-session mode
termshark --web --web-sessions
# Create an initial session with a name
termshark --web --web-sessions --session-name "My Analysis" -r capture.pcap
# Start with live capture in a named session
sudo termshark --web --web-sessions --session-name "Live Capture" -i eth0- Connection status: Shows WebSocket connection state
- Session info: Displays current session name (in multi-session mode)
- Sessions button: Opens session picker (multi-session mode only)
- Filter input: Enter Wireshark display filters (e.g.,
tcp.port == 80) - Apply button: Apply the current filter
- Capture controls: Start/stop live capture (when supported)
- Interface selector dropdown
- Start/Stop capture buttons
- Capture status indicator
- File input: Load a local pcap file (requires server-side path)
- Click a row to select it
- Use j/k or arrow keys to navigate
- Selected packet details appear below
- Auto-refreshes during live capture
- Tree view: Expandable protocol tree
- Hex view: Raw bytes with ASCII
In multi-session mode, multiple users can collaborate:
- Create a session: Enter a name and click "Create Session"
- Join a session: Click on an existing session to join
- Share the URL: Other users can access the same server and join your session
- View session info: See how many clients are connected, packet count, etc.
- Real-time state synchronization across clients
- Independent display filters per client
- Shared packet data and analysis
- Session persistence until deleted
| Key | Action |
|---|---|
j or ↓ |
Select next packet |
k or ↑ |
Select previous packet |
/ |
Focus filter input |
Escape |
Unfocus filter input / Close modal |
The web UI uses a three-tier architecture:
Browser <--WebSocket--> Go Server <--Unix Socket--> sharkd
- Browser: Static HTML/JS/CSS served by Go
- Go Server: Proxies JSON-RPC between browser and sharkd
- sharkd: Wireshark's daemon providing packet analysis
┌─── Session 1 ─── Manager ─── sharkd
Browser 1 ──┐ │
Browser 2 ──┼─ Go Server ─── Registry
Browser 3 ──┘ │
└─── Session 2 ─── Manager ─── sharkd
Each session has its own state manager and sharkd backend, allowing isolated analysis.
The web UI uses JSON-RPC 2.0 over WebSocket. Key methods:
sessions.list: List all available sessionssessions.create: Create a new sessionsessions.join: Join an existing sessionsessions.leave: Leave current sessionsessions.info: Get session detailssessions.delete: Delete a session
status: Get current status (packet count, columns, etc.)load: Load a pcap fileframes: Get packet summariesframe: Get packet detailscheck: Validate a display filtersetfilter: Apply a display filter
listInterfaces: List available network interfacesstartCapture: Start live capturestopCapture: Stop live captureisCapturing: Check capture status
Ensure sharkd is in your PATH:
which sharkd
# If not found, install wireshark-common or build from sourceCheck if the server started successfully and the port is available.
Verify the pcap file path is accessible from the server's perspective.
- Ensure you have permission to enumerate network interfaces
- Run with sudo for full capture support
- Check that dumpcap is properly configured
- Ensure all users are connecting to the same server address
- Verify
--web-sessionsflag is enabled - Check firewall settings if accessing remotely
- The web UI has no authentication by default
- Use
127.0.0.1(default) to restrict to local access - For remote access, use a reverse proxy with authentication
- Live capture requires elevated privileges
- Consider network segmentation for sensitive traffic analysis