I am very excited about this one. While we are at this heavy change I’d like to suggest a few more modifications to the protocol since we are in this transition period (not sure if any of these break backwards compatibility though):
- Add block hash to requests so we could do hash based look ups rather than file/offset/size in the future.
- Add options (same as cluster has) to ClusterConfig->Folder structures, these can then be used to carry custom information about the folder which future versions might support (such as folder labels we are talking about, encryption keys or whatever else)
Alternatively, I’d be in favor of moving into some more flexible protocol definitions where it wouldn’t be as painful to add and remove stuff, but that’s a lot of work which is not going to yield any benefit in the short term.
Now discovery… I started working on new discovery twice now. I have a basic DNSSEC + TLS/TCP based approach skeleton but I’ve realized that it will not work because of multiple issues… It could still be done using DNS (which helps carry the load), it would just be a bit more hacky.
I decided that as a very basic first step I’ll move the announcements to TLS so we could prevent DoS. I realized that there a few other problems before that, and started hacking through the UPnP, announce and discovery code supporting multiple UPnP mappings, multiple announce servers and so on… I thought that once that is hacked out, I’ll move the TCP announce part to TLS and add the verification of the announcer, but given it’s needed I can move querying to HTTPS too.
I guess DST announcements would still have to be done via a separate socket, so my changes have very little to do with this, and given we do move to HTTPS querying, we still have to support old UDP querying/announcements (which will have no way of announcing DST ports) I’ll have the opportunity to have DST compatibility in mind.