syncthing / syncthing

Open Source Continuous File Synchronization
https://syncthing.net/
Mozilla Public License 2.0
65.7k stars 4.32k forks source link

gui: Address override not respected in fresh default config #9783

Closed acolomb closed 3 days ago

acolomb commented 4 weeks ago

What happened?

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 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.

When not probing for free ports (--skip-port-probing), the override should still be persisted rather than the default address. Only when generating a fresh default config.xml, never on an existing one.

Syncthing version

1.28.0

Platform & operating system

Linux amd64

Browser version

No response

Relevant log output

No response