syncthing/lib/config
André Colomb 5237337626
cmd/syncthing: Add --skip-port-probing (fixes #8090) (#8099)
* cmd/syncthing: Remove unnecessary function arguments.

The openGUI() function does not need a device ID to work, and there is
only one caller anyway which uses EmptyDeviceID.

The loadOrDefaultConfig() function is always called with the same
dummy values.

* cmd/syncthing: Avoid misleading info messages from monitor process.

In order to check whether panic reporting is enabled, the monitor
process utilizes the loadOrDefaultConfig() function.  In case there is
no config file yet, info messages may be logged during creation if the
config Wrapper, which is discarded immediately after.

Stop using the DefaultConfig() utility function from lib/syncthing and
directly generate a minimal config instead to avoid these.

Add comments to loadOrDefaultConfig() explaining its limited purpose.

* cmd/syncthing/generate: Always write updated config file.

Previously, an existing config file was left untouched unless either
of the --gui-user or --gui-password options was given.  Remove that
condition and simplify the checking code.

* lib/config: Factor out ProbeFreePorts().

* cmd/syncthing: Add option --skip-port-probing.

Applies to both the "generate" and "serve" subcommands, as well as the
deprecated --generate option, just as the --no-default-folder flag.
2022-01-07 11:19:17 +01:00
..
mocks all: Make config.Wrapper an actual suture.Service (fixes #7451) (#7452) 2021-03-11 14:51:00 +01:00
testdata all: Add configurable defaults (fixes #4224, fixes #6086) (#7131) 2021-02-04 21:10:41 +01:00
authmode.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
authmode.pb.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
blockpullorder.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
blockpullorder.pb.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
commit_test.go lib: Apply config changes sequentially (ref #5298) (#7188) 2021-01-15 15:43:34 +01:00
config_test.go lib/config, lib/ignore: Write Windows line endings (fixes #7115) (#8052) 2021-11-22 09:38:24 +01:00
config.go cmd/syncthing: Add --skip-port-probing (fixes #8090) (#8099) 2022-01-07 11:19:17 +01:00
config.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
debug.go all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
deviceconfiguration.go all: Add configurable defaults (fixes #4224, fixes #6086) (#7131) 2021-02-04 21:10:41 +01:00
deviceconfiguration.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
folderconfiguration.go lib/config: Always set mtime window to 2 on Android unless ext detected (ref #7963) (#7966) 2021-09-27 21:29:51 +02:00
folderconfiguration.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
foldertype.go all: Add untrusted folders behind feature flag (ref #62) (#7055) 2020-11-09 15:33:32 +01:00
foldertype.pb.go all: Add untrusted folders behind feature flag (ref #62) (#7055) 2020-11-09 15:33:32 +01:00
guiconfiguration.go lib/config: Move the bcrypt password hashing to GUIConfiguration (#8028) 2021-11-08 13:32:04 +01:00
guiconfiguration.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
ldapconfiguration.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
ldapconfiguration.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
ldaptransport.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
ldaptransport.pb.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
migrations_test.go lib/api: Add /rest/config endpoint (fixes #6540) (#7001) 2020-10-22 19:54:35 +02:00
migrations.go all: Fix versioning path handling (#7407) 2021-02-26 12:04:05 +01:00
observed.pb.go build: Update all dependencies (#7968) 2021-09-26 12:08:23 +02:00
optionsconfiguration.go lib/config, lib/connections: Add optional connection limits (fixes #7176) (#7223) 2021-01-11 15:14:44 +01:00
optionsconfiguration.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
pullorder.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
pullorder.pb.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
size_test.go lib: Use uint64 for disk stats (ref #3930) (#7019) 2020-10-02 15:22:28 +02:00
size.go lib: Use uint64 for disk stats (ref #3930) (#7019) 2020-10-02 15:22:28 +02:00
size.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
tuning_test.go Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
tuning.go all: Use protobuf to generate config structs (fixes #6734) (#6900) 2020-08-25 08:11:14 +02:00
tuning.pb.go all: Move remaining protos to use the vanity plugin (#7009) 2020-10-02 08:07:05 +02:00
versioningconfiguration.go all: Fix versioning path handling (#7407) 2021-02-26 12:04:05 +01:00
versioningconfiguration.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
wrapper.go lib/config, lib/ignore: Write Windows line endings (fixes #7115) (#8052) 2021-11-22 09:38:24 +01:00