evilsocket / evilsocket/opensnitch
[Bug Report] UI uses transport peer as node identity, which breaks proxied/tunneled deployments
- Dominant language
- Python
- Stars
- 14.1k
- Forks
- 665
- PR merge metrics
- No merged PRs in 30d
Description
OpenSnitch's UI currently treats the gRPC transport peer as the node identity.
That works when each daemon connects directly from a unique network address,
but it breaks when multiple daemons are forwarded through a proxy or tunnel
and arrive at the UI from the same loopback peer.
One concrete example is Qubes OS, where several daemon VMs can be forwarded
into a single UI VM. In that setup, different daemons may all appear to the UI
as the same loopback peer, so they collapse into one node entry. The daemon
already sends user-facing metadata such as `ClientConfig.name`, but the
canonical node key is still derived from transport identity.
Include the following information:
- OpenSnitch version: v1.8.0
- OS: Qubes OS
- OS version: 4.3
- Kernel version: `6.19.5-1.qubes.fc41.x86_64
### To Reproduce:
1. Run the UI in one Qubes VM.
2. Forward multiple daemon VMs into that UI VM through the usual Qubes
transport path.
3. Observe that the UI derives the canonical node key from the transport peer.
4. Different daemons can then collapse into one node entry because they arrive
through the same loopback peer.
### Post error logs:
There are no meaningful crash logs here. The issue is incorrect node identity
handling, not a daemon crash.
### Expected behavior (optional):
Problem:
- `context.peer()` is transport/session identity, not durable node identity
- transport identity can legitimately change across reconnects
- transport identity can be shared by multiple logical daemons in proxied/
tunneled setups
- downstream UI behavior then associates notifications, reconnects, and per-
node state with the wrong node
Proposed direction:
- add a stable `node_id` field to `ClientConfig`
- have the daemon populate it
- have the UI use `node_id` as the canonical node key when present
- keep transport peer only as session/debug/reconnect metadata
- keep `name` as display text only
Compatibility:
- if `node_id` is absent, the UI can fall back to the old behavior
- for loopback/proxied environments, a temporary compatibility fallback to
`name` still helps mixed deployments
### Additional context:
I have a branch implementing this approach and can open a PR if this direction
sounds acceptable.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.