Syncthing Windows Setup v1.27.11

Starting in v1.27.11, Syncthing Windows Setup (SWS) will connect to GitHub to automatically download and install the latest Windows version of Syncthing. If you want to use SWS to install Syncthing on a Windows machine that can’t connect to GitHub, you can also perform an offline install where you download the latest zip file separately and specify the zip file’s name during the setup process (or via the /zipfilepath command-line parameter for silent installs).

This approach offers a couple of significant advantages:

  • SWS will only need to be updated in case of issues with the installer itself (or with the supplementary tools it provides)
  • The SWS executable will be much smaller because it no longer embeds the syncthing.exe Windows executables

Hopefully this will help reduce anti-malware false-positives over time because the installer executable will remain static for a longer period of time.

I’m still testing and validating this new approach, but so far I’m happy with the results.

6 Likes

I have a couple of ideas:

  • Let the installer look in its directory for zip file with a name that matches a predetermined format and use that (e.g. .\syncthing-windows*.zip)
  • Certain locations on earth do not have access to github, or at least cannot download content from github (whatever reasons cause this (political, national security, etc)). What’s a good workaround for this?

I have discussed this 2nd point in an earlier post (Unable to automatic upgrade due to Geographical Discrimination), and it seems to have been solved by enabling the updates to be served from syncthing relays. Perhaps the same relays can be used by the installer for downloading?

1 Like
  • Let the installer look in its directory for zip file with a name that matches a predetermined format and use that (e.g. .\syncthing-windows*.zip)

This is possible using a script. PowerShell example:

$ZipFiles = Get-ChildItem "syncthing-windows-amd64-*.zip"
if ( $null -eq $ZipFiles ) {
  throw "No Syncthing installation zip files found."
}

$LatestVersion = [Version] "0.0.0"
$ZipFilePath = ""
foreach ( $ZipFile in $ZipFiles ) {
  $RegexMatches = [Regex]::Match($ZipFile.Name,'-v((?:\d+\.){2}\d+)\.zip$')
  if ( $null -ne $RegexMatches ) {
    if ( ([Version] $RegexMatches.Groups[1].Value) -gt $LatestVersion ) {
      $LatestVersion = [Version] $RegexMatches.Groups[1].Value
      $ZipFilePath = $ZipFile.FullName
    }
  }
}
if ( $LatestVersion -eq [Version] "0.0.0" ) {
  throw "Could not find latest version of Syncthing installation zip file."
}

.\syncthing-windows-setup.exe /zipfilepath=$ZipFilePath ...
  • Certain locations on earth do not have access to github, or at least cannot download content from github (whatever reasons cause this (political, national security, etc)). What’s a good workaround for this?

I don’t know of a workaround, as Github is the official download location of the Syncthing executables.

AFAIK, this was only a thought by @calmh, but has not actually been implemented. Upgrades are only available through GitHub AFAIK*.

I think if someone is really unable to connect to GitHub, the best option for them is to use a service like Tor (or a VPN perhaps) for upgrading.

*For rate limiting reasons, the metadata about upgrades is not hosted on GitHub but on a project-hosted machine, but the actual binary downloads just refer to GitHub: https://upgrades.syncthing.net/meta.json