Merge branch 'main' into v2

* main:
  feat(config): add option for audit file (fixes #9481) (#10066)
  chore(api): log X-Forwarded-For (#10035)
  chore(gui): update dependency copyrights, add script for periodic maintenance (#10067)
  chore(gui, man, authors): update docs, translations, and contributors
  chore(syncthing): remove support for TLS 1.2 sync connections (#10064)
  fix(osutil): give threads same I/O priority on Linux (#10063)
  chore(stun): switch lookup warning to debug level
  chore(gui, man, authors): update docs, translations, and contributors
This commit is contained in:
Jakob Borg
2025-04-24 08:47:52 +07:00
31 changed files with 716 additions and 109 deletions
+13 -2
View File
@@ -533,8 +533,19 @@ func (c *serveCmd) syncthingMain() {
Verbose: c.Verbose,
DBMaintenanceInterval: c.DBMaintenanceInterval,
}
if c.Audit {
appOpts.AuditWriter = auditWriter(c.AuditFile)
if c.Audit || cfgWrapper.Options().AuditEnabled {
l.Infoln("Auditing is enabled.")
auditFile := cfgWrapper.Options().AuditFile
// Ignore config option if command-line option is set
if c.AuditFile != "" {
l.Debugln("Using the audit file from the command-line parameter.")
auditFile = c.AuditFile
}
appOpts.AuditWriter = auditWriter(auditFile)
}
app, err := syncthing.New(cfgWrapper, sdb, evLogger, cert, appOpts)