aboutsummaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2021-01-11 15:14:44 +0100
committerGitHub <noreply@github.com>2021-01-11 15:14:44 +0100
commit0b193b76c25d88af72f2f6e3565a73762d8cf301 (patch)
tree8246cc28f87b90c1c841f2a87e764be2a1f8e521 /proto
parente6f0ed65be02d1ed278989f5d9fca948880e4ebd (diff)
downloadsyncthing-0b193b76c25d88af72f2f6e3565a73762d8cf301.tar.gz
syncthing-0b193b76c25d88af72f2f6e3565a73762d8cf301.zip
lib/config, lib/connections: Add optional connection limits (fixes #7176) (#7223)
This adds two new configuration options: // The number of connections at which we stop trying to connect to more // devices, zero meaning no limit. Does not affect incoming connections. ConnectionLimitEnough int // The maximum number of connections which we will allow in total, zero // meaning no limit. Affects incoming connections and prevents // attempting outgoing connections. ConnectionLimitMax int These can be used to limit the number of concurrent connections in various ways.
Diffstat (limited to 'proto')
-rw-r--r--proto/lib/config/optionsconfiguration.proto8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/lib/config/optionsconfiguration.proto b/proto/lib/config/optionsconfiguration.proto
index 9ad017bff..5792be864 100644
--- a/proto/lib/config/optionsconfiguration.proto
+++ b/proto/lib/config/optionsconfiguration.proto
@@ -58,6 +58,14 @@ message OptionsConfiguration {
bool send_full_index_on_upgrade = 49;
repeated string feature_flags = 50;
+ // The number of connections at which we stop trying to connect to more
+ // devices, zero meaning no limit. Does not affect incoming connections.
+ int32 connection_limit_enough = 51;
+
+ // The maximum number of connections which we will allow in total, zero
+ // meaning no limit. Affects incoming connections and prevents
+ // attempting outgoing connections.
+ int32 connection_limit_max = 52;
// Legacy deprecated
bool upnp_enabled = 9000 [deprecated = true, (ext.goname) = "DeprecatedUPnPEnabled"];