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
Properly indicate whether a connection is "LAN" or not in the GUI #8686
Comments
We should also treat ULA IPs as LAN: |
We do compare against all directly connected networks already. If there is extra logic in the GUI that should probably be changed to just look at an |
I've been poking around in the code, trying to expose that flag to the GUI. Not sure I've got the cleanest possible solution, but at least it does fix the wrong classifications in my tests. Will send a PR soonish to discuss the implementation. |
…cal (fixes #8686) (#8694) * lib/connections: Cache isLAN decision for later external access. The check whether a remote device's address is on a local network currently happens when handling the Hello message, to configure the limiters. Save the result to the ConnectionInfo and pass it out as part of the model's ConnectionInfo struct in ConnectionStats(). * gui: Use provided connection attribute to distinguish LAN / WAN. Replace the dumb IP address check which didn't catch common cases and actually could contradict what the backend decided. That could have been confusing if the GUI says WAN, but the limiter is not actually applied because the backend thinks it's a LAN. Add strings for QUIC and relay connections to also differentiate between LAN and WAN. * gui: Redefine reception level icons for all connection types. Move the mapping to the JS code, as it is much easier to handle multiple switch cases by fall-through there. QUIC is regarded no less than TCP anymore. LAN and WAN make the difference between levels 4 / 3 and 2 / 1: {TCP,QUIC} LAN --> {TCP,QUIC} WAN --> Relay LAN --> Relay WAN --> Disconnected.
IPv6 LAN connections currently show up as WAN connections because they use public IPv6 addresses. We should check if the other address is in the same subnet to determine if it's a LAN connection.
Apart from the wrong connection type in the UI, this might also affect bandwidth limitation logic.
https://forum.syncthing.net/t/towards-better-connection-type-icons/19333/23
The text was updated successfully, but these errors were encountered: