lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868)

This makes the various protocol priorities configurable among the other
options. With this, it's possible to prefer QUIC over TCP for WAN
connections, for example. Both sides need to be similarly configured for
this to work properly.

The default priority order remains the same as previously (TCP, QUIC,
Relay, with LAN better than WAN).

To make this happen I made each dialer & listener more priority aware,
and moved the check for whether a connection is LAN or not into the
dialer / listener -- this is the new "lanChecker" type that's passed
around.
This commit is contained in:
Jakob Borg
2023-04-16 14:54:28 +02:00
committed by GitHub
parent c867a5f5b3
commit 9b660c1959
16 changed files with 622 additions and 361 deletions
+5
View File
@@ -45,6 +45,11 @@
<unackedNotificationID>asdfasdf</unackedNotificationID>
<announceLANAddresses>false</announceLANAddresses>
<featureFlag>feature</featureFlag>
<connectionPriorityTcpLan>40</connectionPriorityTcpLan>
<connectionPriorityQuicLan>45</connectionPriorityQuicLan>
<connectionPriorityTcpWan>50</connectionPriorityTcpWan>
<connectionPriorityQuicWan>55</connectionPriorityQuicWan>
<connectionPriorityRelay>9000</connectionPriorityRelay>
</options>
<defaults>
<folder id="" label="" path="/media/syncthing" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">