sniffnet icon indicating copy to clipboard operation
sniffnet copied to clipboard

[Feature Request] Show latency of connections

Open TheWyn opened this issue 8 months ago • 7 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues.

Describe the solution you'd like

It'd be nice to see ping/latency of open connections to know if you're close to the target server. Similar program with said feature would be Resource Monitor that would come with Windows.

Is your feature request related to a problem?

I used this feature for online gaming, not every game shows what your ping/latency is. With online games having multiple locations/providers it's nice to know you're using the optimal one.

TheWyn avatar Jul 01 '25 17:07 TheWyn

Hey @TheWyn thanks for opening this issue.

Where would you expect to see the latency in Sniffnet? In the inspect page table? Cause in the overview page, and more specifically the network hosts section, more than one connection is agglomerated for each entry.

I'm also starting to wonder which would be the best way to collect latencies for each connection, since pinging each of them doesn't feel optimal.

GyulyVGC avatar Jul 01 '25 21:07 GyulyVGC

Hey @TheWyn thanks for opening this issue.

Where would you expect to see the latency in Sniffnet? In the inspect page table? Cause in the overview page, and more specifically the network hosts section, more than one connection is agglomerated for each entry.

I'm also starting to wonder which would be the best way to collect latencies for each connection, since pinging each of them doesn't feel optimal.

I'd expect to see it in the inspect table or in the connection details, if it was possible to see connection details per program that would also be an option.

TheWyn avatar Jul 02 '25 01:07 TheWyn

I think the Inspect page table would be the best place to show latency since it focuses on individual connections, and latency really varies per connection. On the Overview page, especially in the Network Hosts section, multiple connections get grouped together, so it’s harder to show meaningful latency info for each host there.

About how to collect latency data, pinging every connection one by one might be a bit too heavy and could cause extra traffic or slow things down. Maybe we could try other approaches like:

1)Using passive measurements from traffic timestamps, like how long the TCP handshake takes, if that info is available 2)Sending ICMP or TCP timestamp requests only when needed or just for some selected connections 3)Caching latency values and updating them every now and then to keep overhead low

Shreyash-Narvekar avatar Jul 10 '25 04:07 Shreyash-Narvekar

Labeling this issue as https://github.com/GyulyVGC/sniffnet/labels/good%20first%20issue and https://github.com/GyulyVGC/sniffnet/labels/help%20wanted to gather additional feedback and help

GyulyVGC avatar Jul 24 '25 12:07 GyulyVGC

I think the best approach would be to only ping the selected connections, as pinging other connections would only add to the network load and be of no value. These selected connections can then be cached and updated every nth second.

Or we can inspect a single connection, and have a button which measures latency.

voiceroy avatar Jul 24 '25 13:07 voiceroy

Would it be possible to create a virtual network adapter, send program traffic through it then sniffnet monitors that to get latencies? Then no additional requests would need to be made for anything. (Im not sure how networking stuff works spit balling here)

TheWyn avatar Jul 28 '25 00:07 TheWyn

It's possible to create a virtual adapter, but how could it help to compute latencies? The virtual adapter would still need to ping the remote server to measure how much time it takes to have a response.

GyulyVGC avatar Jul 28 '25 07:07 GyulyVGC