-
Couldn't load subscription status.
- Fork 235
Randomize and adapt ping intervals in connection dialog to reduce correlation #3550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- make sure that after the dialog is hidden all server get a ping soon, also distant ones, but still in a way that it is not regular pattern - use randomized timer interval of 1000-1250ms since the real interval is calculated internally by skipping, also changed this to be smooth scaled - cleanup the map stuff, just store this in the Qt::UserRole data - network address is costly, cache it in Qt::UserRole - renamed things a bit and cleanup
…e normal 2500ms ping interval otherwise the longer delay will be treated as a stop of ping, fPingMaxMultiplier is now 3.0 instead of 9.0, could be increased in the future...
- store all data in UserRole of first column, no need to have an invisible column, - added enum for userrole fields - detailed stats only in debug - some minor adjustments on timings
| qDebug() << "\nPattern analysis:"; | ||
| qDebug() << " Average pings/sec:" << QString::number ( avgPingsPerSecond, 'f', 2 ); | ||
| qDebug() << " Spikes detected (>2x avg):" << iSpikesDetected << "seconds"; | ||
| qDebug() << " Distribution: " << ( iSpikesDetected > 10 ? "IRREGULAR (many spikes)" : "SMOOTH (good stealth)" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set up a time-out when a burst of pings arrive from one IP:PORT, because I thought these were non-clients. Then my own client triggered the time-out for bursting pings. Seems odd for the client to do this.
Short description of changes
To avoid correlation on client behaviour this change will randomize the ping intervals, adaptive to the ping time, nearer servers get pinged more often, distant ones less.
To avoid correlation of "hide connect dialog" (ping immediately stops) and "connected to a server" (user appears on a server) it will keep pinging for approx. 60 seconds after the dialog gets hidden.
In addition:
CHANGELOG: Randomized and adaptive ping intervals in connection dialog, keep ping running after some time after dialog gets closed.
Context: Fixes an issue?
See https://github.com/orgs/jamulussoftware/discussions/3545
Does this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
What is missing until this pull request can be merged?
Unsure if the diagnostic code (currently only in debug builds) can/should be kept in.
Checklist