'Client.Timeout exceeded while awaiting headers' error on Android w/ self-hosted discovery server

Don’t use -http on the discovery server unless you’re fronting it with a proxy like Nginx and that proxy sends the expected headers and so on. Discovery over actual http isn’t supported and that flag is for proxied setups only. What you want to do in the minimal, most insecure case is:

  • Run the discovery server with a self signed certificate for whatever name (but not a numeric IP - those are magic in TLS certificates), such as one that Syncthing has generated.
  • Let Syncthing use it using https://192.0.2.42/?insecure to disable the certificate verification (or using the proper ?id=...).