all: Add configurable defaults (fixes #4224, fixes #6086) (#7131)

This commit is contained in:
Simon Frei
2021-02-04 21:10:41 +01:00
committed by GitHub
parent 31119ed61a
commit ffc14a77c6
41 changed files with 1708 additions and 1046 deletions
+6
View File
@@ -20,4 +20,10 @@ message Configuration {
OptionsConfiguration options = 6;
repeated ObservedDevice ignored_devices = 7 [(ext.json) = "remoteIgnoredDevices", (ext.xml) = "remoteIgnoredDevice"];
repeated ObservedDevice pending_devices = 8 [deprecated=true];
Defaults defaults = 9;
}
message Defaults {
FolderConfiguration folder = 1;
DeviceConfiguration device = 2;
}
+2 -2
View File
@@ -8,14 +8,14 @@ import "lib/config/observed.proto";
import "ext.proto";
message DeviceConfiguration {
bytes device_id = 1 [(ext.goname) = "DeviceID", (ext.xml) = "id,attr", (ext.json) = "deviceID", (ext.device_id) = true];
bytes device_id = 1 [(ext.goname) = "DeviceID", (ext.xml) = "id,attr", (ext.json) = "deviceID", (ext.device_id) = true, (ext.nodefault) = true];
string name = 2 [(ext.xml) = "name,attr,omitempty"];
repeated string addresses = 3 [(ext.xml) = "address,omitempty", (ext.default) = "dynamic"];
protocol.Compression compression = 4 [(ext.xml) = "compression,attr"];
string cert_name = 5 [(ext.xml) = "certName,attr,omitempty"];
bool introducer = 6 [(ext.xml) = "introducer,attr"];
bool skip_introduction_removals = 7 [(ext.xml) = "skipIntroductionRemovals,attr"];
bytes introduced_by = 8 [(ext.xml) = "introducedBy,attr", (ext.device_id) = true];
bytes introduced_by = 8 [(ext.xml) = "introducedBy,attr", (ext.device_id) = true, (ext.nodefault) = true];
bool paused = 9;
repeated string allowed_networks = 10 [(ext.xml) = "allowedNetwork,omitempty"];
bool auto_accept_folders = 11;
+4 -4
View File
@@ -20,10 +20,10 @@ message FolderDeviceConfiguration {
}
message FolderConfiguration {
string id = 1 [(ext.goname) = "ID", (ext.xml) = "id,attr"];
string id = 1 [(ext.goname) = "ID", (ext.xml) = "id,attr", (ext.nodefault) = true];
string label = 2 [(ext.xml) = "label,attr", (ext.restart) = false];
fs.FilesystemType filesystem_type = 3;
string path = 4 [(ext.xml) = "path,attr"];
string path = 4 [(ext.xml) = "path,attr", (ext.default) = "~"];
FolderType type = 5 [(ext.xml) = "type,attr"];
repeated FolderDeviceConfiguration devices = 6;
int32 rescan_interval_s = 7 [(ext.xml) = "rescanIntervalS,attr", (ext.default) = "3600"];
@@ -31,7 +31,7 @@ message FolderConfiguration {
int32 fs_watcher_delay_s = 9 [(ext.goname) = "FSWatcherDelayS", (ext.xml) = "fsWatcherDelayS,attr", (ext.default) = "10"];
bool ignore_perms = 10 [(ext.xml) = "ignorePerms,attr"];
bool auto_normalize = 11 [(ext.xml) = "autoNormalize,attr", (ext.default) = "true"];
Size min_disk_free = 12;
Size min_disk_free = 12 [(ext.default) = "1 %"];
VersioningConfiguration versioning = 13;
int32 copiers = 14;
int32 puller_max_pending_kib = 15 [(ext.goname) = "PullerMaxPendingKiB", (ext.xml) = "pullerMaxPendingKiB", (ext.json) = "pullerMaxPendingKiB"];
@@ -40,7 +40,7 @@ message FolderConfiguration {
bool ignore_delete = 18;
int32 scan_progress_interval_s = 19;
int32 puller_pause_s = 20;
int32 max_conflicts = 21 [(ext.default) = "-1"];
int32 max_conflicts = 21 [(ext.default) = "10"];
bool disable_sparse_files = 22;
bool disable_temp_indexes = 23;
bool paused = 24;
+1 -1
View File
@@ -44,7 +44,7 @@ message OptionsConfiguration {
int32 temp_index_min_blocks = 35 [(ext.default) = "10"];
repeated string unacked_notification_ids = 36 [(ext.goname) = "UnackedNotificationIDs", (ext.xml) = "unackedNotificationID", (ext.json) = "unackedNotificationIDs"];
int32 traffic_class = 37;
string default_folder_path = 38 [(ext.default) = "~"];
string default_folder_path = 38 [deprecated = true];
bool set_low_priority = 39 [(ext.default) = "true"];
int32 max_folder_concurrency = 40 [(ext.goname) = "RawMaxFolderConcurrency"];
string crash_reporting_url = 41 [(ext.goname) = "CRURL", (ext.xml) = "crashReportingURL", (ext.json) = "crURL", (ext.default) = "https://crash.syncthing.net/newcrash"];