[Feat] Allow override of GUI's listen address from Syncthing configuration file or environs #98
+51
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR replaces the hardcoded default GUI listen address
--gui-address=0.0.0.0:8384with a lookup sequence:STGUIHOSTandSTGUIPORTconfig.xml0.0.0.0and8384Benefits of this PR and context:
After updating the container to the latest version, it was no longer possible to override the
--gui-address=0.0.0.0:8384command argument during initialization, which broke my deployment setup.This PR introduces a flexible mechanism to control the GUI listening host and port, which is useful for deployments with race conditions or setups requiring custom configuration of the GUI endpoint.
How Has This Been Tested?
docker build --no-cache --pull -t lscr.io/linuxserver/syncthing:latest .0.0.0.0:8384config.xmlto changegui.address, then restarting the container correctly applies the configured values<address>127.0.0.1:4242</address>->--gui-address=127.0.0.1:4242<adress>:4242<address>->--gui-address=0.0.0.0:4242<address> :80 </address>->--gui-address=0.0.0.0:80This PR introduces no breaking changes.
Source / References: