conicalflask / fs2

A sophisticated file sharing system for LAN parties with a focus on fast accurate searching, easy browsing and fast transfers.
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Add a header to the responses from indexnodes to include their UID (as seen in advert packets). #24

Closed mt-inside closed 4 years ago

mt-inside commented 11 years ago

It would be nice if statically-configured indexnodes (e.g. ones on the internet where the advert packets aren't visible) could be queried for their UID. This would allow us to prevent an indexnode being added more than once, even if it's in a config file more than once (this isn't so trivial to connect as it could be listed by hostname and IP or the box could have multiple IPs or cnames).

fsfuse currently queries statically-configured indexnodes for their protocol version to see if they're valid. This is done by sending an HTTP HEAD request for /. I've added an "indexnode UID" header to the HTTP filter. I think that filter is used for all HTTP responses? E.g. used by clients too? Atm it won't crash, it'll just send 0. This might not be the best behaviour though, might only want to send the header when it's non-0?