syncthing/lib
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
..
api all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
assets all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
beacon all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00
build all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
config cmd/syncthing: Add --skip-port-probing (fixes #8090) (#8099) 2022-01-07 11:19:17 +01:00
connections lib/config: Decouple VerifyConfiguration from Committer (#7939) 2021-11-22 08:45:29 +01:00
db gui, lib: Fix tracking deleted locally-changed on encrypted (fixes #7715) (#7726) 2021-11-10 09:46:21 +01:00
dialer lib/connections: Fix and optimize registry (#7996) 2021-10-06 10:52:51 +02:00
discover all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
events build: List go:generate tools in tools.go (#7599) 2021-05-08 12:52:06 +02:00
fs lib/fs: Optimize Canonicalize 2021-11-23 21:25:29 +01:00
ignore lib/config, lib/ignore: Write Windows line endings (fixes #7115) (#8052) 2021-11-22 09:38:24 +01:00
locations Normalize CLI options to always use two dashes. (#8037) 2021-11-04 08:42:55 +01:00
logger all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
model lib: Fix panic due to closed event subscriptions on shutdown (#8079) 2021-12-22 20:16:21 +01:00
nat all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
osutil lib/osutil: Use x/sys/windows for SetLowPriority 2021-11-27 15:35:07 +01:00
pmp lib/nat: Make service termination faster (#6777) 2020-06-22 09:01:57 +01:00
protocol lib/protocol: Remove unused sorting boilerplate 2021-11-27 15:35:07 +01:00
rand lib/rand: Optimizations (#7964) 2021-09-26 12:15:39 +02:00
rc all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
relay lib/relay: Send SNI when the address is a host name (fixes #8014) (#8015) 2021-11-22 08:31:03 +01:00
scanner all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
sha256 all: Use crypt/rand through its buffered version, but not in benchmarks (#7420) 2021-03-02 19:17:20 +01:00
signature all: Use crypt/rand through its buffered version, but not in benchmarks (#7420) 2021-03-02 19:17:20 +01:00
stats all: Truncate some timestamps (fixes #7457) (#7459) 2021-03-12 10:35:10 +01:00
stun lib/stun: Prevent nil deref when naming service (#7872) 2021-08-05 00:04:22 +01:00
svcutil lib/relay, lib/svcutil: Improve service logging (fixes #7580) (#7647) 2021-05-10 22:26:25 +02:00
sync lib/sync: Make the clock a function pointer 2021-11-27 15:35:07 +01:00
syncthing cmd/syncthing: Add --skip-port-probing (fixes #8090) (#8099) 2022-01-07 11:19:17 +01:00
testutils lib: Use counterfeiter to mock interfaces in tests (#7375) 2021-03-03 08:53:50 +01:00
tlsutil lib/syncthing: Clean up / refactor LoadOrGenerateCertificate() utility function. (#8025) 2021-11-07 23:59:48 +01:00
upgrade lib/upgrade: Use strings.Reader instead of bytes.Buffer 2021-11-27 15:35:07 +01:00
upnp all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
ur lib/config: Decouple VerifyConfiguration from Committer (#7939) 2021-11-22 08:45:29 +01:00
util lib/connections: Fix and optimize registry (#7996) 2021-10-06 10:52:51 +02:00
versioner all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
watchaggregator lib: Fix panic due to closed event subscriptions on shutdown (#8079) 2021-12-22 20:16:21 +01:00
weakhash all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00