aboutsummaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2023-04-16 12:54:28 +0000
committerGitHub <noreply@github.com>2023-04-16 14:54:28 +0200
commit9b660c1959ef44ee05a55b39dbdf6295ac81f347 (patch)
tree1ff9b59cc30743f7b5eef2a07cc8910e5aa8a280 /proto
parentc867a5f5b3a5ff150a82000aa1657ffea02cfa56 (diff)
downloadsyncthing-9b660c1959ef44ee05a55b39dbdf6295ac81f347.tar.gz
syncthing-9b660c1959ef44ee05a55b39dbdf6295ac81f347.zip
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.
Diffstat (limited to 'proto')
-rw-r--r--proto/lib/config/optionsconfiguration.proto7
1 files changed, 7 insertions, 0 deletions
diff --git a/proto/lib/config/optionsconfiguration.proto b/proto/lib/config/optionsconfiguration.proto
index 9981191f6..0e2474695 100644
--- a/proto/lib/config/optionsconfiguration.proto
+++ b/proto/lib/config/optionsconfiguration.proto
@@ -70,6 +70,13 @@ message OptionsConfiguration {
// default to TLS 1.3+ only.
bool insecure_allow_old_tls_versions = 53 [(ext.goname)= "InsecureAllowOldTLSVersions", (ext.xml) = "insecureAllowOldTLSVersions", (ext.json) = "insecureAllowOldTLSVersions"];
+ int32 connection_priority_tcp_lan = 54 [(ext.default) = "10", (ext.goname) = "ConnectionPriorityTCPLAN"];
+ int32 connection_priority_quic_lan = 55 [(ext.default) = "20", (ext.goname) = "ConnectionPriorityQUICLAN"];
+ int32 connection_priority_tcp_wan = 56 [(ext.default) = "30", (ext.goname) = "ConnectionPriorityTCPWAN"];
+ int32 connection_priority_quic_wan = 57 [(ext.default) = "40", (ext.goname) = "ConnectionPriorityQUICWAN"];
+ int32 connection_priority_relay = 58 [(ext.default) = "50"];
+ int32 connection_priority_upgrade_threshold = 59 [(ext.default) = "0"];
+
// Legacy deprecated
bool upnp_enabled = 9000 [deprecated = true, (ext.goname) = "DeprecatedUPnPEnabled"];
int32 upnp_lease_m = 9001 [deprecated = true, (ext.goname) = "DeprecatedUPnPLeaseM", (ext.xml) = "upnpLeaseMinutes,omitempty"];