syncthing/lib/config
André Colomb 65d0ca8aa9
fix(config): respect GUI address override in fresh default config (fixes #9783) (#9675)
### Purpose

When generating a new `config.xml` file with default options, the GUI
address is populated with a hard-coded default value of
`127.0.0.1:8384`, except for a random free port if that default one is
occupied. This is independent from the GUI configuration default address
defined in the protobuf description. More importantly, it ignores any
`STGUIADDRESS` override given via environment variable or command-line
option, thus probing for the default port instead of the one specified
via override.

The `ProbeFreePorts()` function now respects the override, by reading
the `GUIConfiguration.Address()` method instead of using hard-coded
defaults.

When not calling `ProbeFreePorts()`, the override should still be
persisted rather than the default address. This happens only when
generating a fresh default `config.xml`, never on an existing one.
2024-11-19 11:01:43 +00:00
..
mocks lib, gui: Default ignores for new folders (fixes #7428) (#7530) 2022-01-13 23:38:21 +01:00
testdata lib/config, gui: Disallow some options in combination with "untrusted" (fixes #8920) (#8921) 2023-06-14 09:24:31 +02: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 style: gofumpt all the things (#9829) 2024-11-19 11:32:56 +01:00
config_test.go fix(ur): actually send usage report directly when enabled (#9736) 2024-09-28 17:02:05 +02:00
config.go fix(config): respect GUI address override in fresh default config (fixes #9783) (#9675) 2024-11-19 11:01:43 +00:00
config.pb.go all: Support syncing ownership (fixes #1329) (#8434) 2022-07-26 08:24:58 +02:00
debug.go style: gofumpt all the things (#9829) 2024-11-19 11:32:56 +01:00
deviceconfiguration.go all: Support multiple device connections (fixes #141) (#8918) 2023-09-06 12:52:01 +02:00
deviceconfiguration.pb.go all: Support multiple device connections (fixes #141) (#8918) 2023-09-06 12:52:01 +02:00
folderconfiguration.go lib/upgrade: Send OS version header to upgrade server (#9663) 2024-08-28 08:31:10 +02:00
folderconfiguration.pb.go lib/config, lib/watchaggregator: Add config for max FS watcher delay (#9558) 2024-05-23 16:21:00 +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 Hide log out button when auth is not enabled (#9158) 2023-10-15 14:10:41 +02:00
guiconfiguration.pb.go Add HTML login form (fixes #4137) (#8757) 2023-10-06 13:00:58 +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: Remove lib/util package (#9049) 2023-08-21 19:44:33 +02:00
observed.pb.go build: Update all dependencies (#7968) 2021-09-26 12:08:23 +02:00
optionsconfiguration.go fix(ur): actually send usage report directly when enabled (#9736) 2024-09-28 17:02:05 +02:00
optionsconfiguration.pb.go lib/config, lib/connections: Configurable protocol priority (ref #8626) (#8868) 2023-04-16 14:54:28 +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 all: Remove lib/util package (#9049) 2023-08-21 19:44:33 +02:00
size.go style: gofumpt all the things (#9829) 2024-11-19 11:32:56 +01: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: Remove lib/util package (#9049) 2023-08-21 19:44:33 +02:00
versioningconfiguration.pb.go all: Regenerate proto (#7696) 2021-05-19 13:30:20 +02:00
wrapper.go all: Support multiple device connections (fixes #141) (#8918) 2023-09-06 12:52:01 +02:00