This is an enhancement request. It鈥檚 goal is to make Syncthing less dependent on the discovery services always being available.
Syncthing should cache all the discovered connection details (protocol, ip, port) for each device. It enables devices to more quickly reconnect after a restart, and it makes them less dependent on the global discovery system. It also means Syncthing would continue to work for many devices during an outage with the Global Discovery system, or government interference with the internet (e.g. if a country disconnects from the global internet).
Local and Global Discovery should only be used in cases where the cached connection details don鈥檛 work. Before reconnection attempts, try the cached addresses, then discovery mechanisms. (Or do this in parallel.) Purge outdated cache entries on the next successful connection.
Sounds reasonable to me!
I don' think "cache all" makes sense, as due to quic/routers etc you might have hundreds of addresses, it would only make sense to cache the addresses we've connected successfully.
Either way, I guess. But we already have an in-memory discovery cache with lifetimes and stuff. Persisting that to database just retains the behavior over restarts and shouldn't be rocket science.
Most helpful comment
Either way, I guess. But we already have an in-memory discovery cache with lifetimes and stuff. Persisting that to database just retains the behavior over restarts and shouldn't be rocket science.