Split #3521 (moved) addressing one of the three original goals from the ticket first mentionned by rransom.
The approach here is to add the key hs/desc/id/<addr.onion> to GETINFO command. If found, the descriptor is printed formatted as described in rend-spec.txt section 1.3.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related.
Learn more.
To be clear, this is only if te descriptor is in the cache. We shouldn't fetch anything based on a getinfo.
Also, we should probably add separate keys for the client-side cache or the service-side cache. They are different, and it's important to keep them separate.
To be clear, this is only if te descriptor is in the cache. We shouldn't fetch anything based on a getinfo.
Absolutely correct. This feature is another upcoming ticket for a new command. Other one of #3521 (moved).
Also, we should probably add separate keys for the client-side cache or the service-side cache. They are different, and it's important to keep them separate.
The HS service descriptor, that's also an other part of #3521 (moved) that I didn't yet have time to open :).
Hrm wait, this change is wrong, it uses the same command for the service and client which is not right because an HS can be a clienté. It's important to differentiate both of them in the controller command.
And if the descriptor isn't found, it replies with an empty string, that is,
{{{
250 hs/client/desc/id/=
}}}
?
Oh true, forgot that, for instance GETINFO ns/id/<OR identity> returns "552 Unrecognized key" if not found so going with that makes sense. But then GETINFO ns/purpose/timeout returns "551 Internal error"... Much prefer 552 though. Unless we want to move towards a scheme of "250 NOT FOUND" ?...
I think the added error messages should be more explicit. The first one should say that address is considered invalid specifically due to wrong length (if, for example, user added $ needlessly in front). The other should probably say "not found in client cache".
The patch LGTM, with a separate patch at a later date adding a generic onion address validator routine to rendcommon.h/c that can return descriptive reasons for why we dislike a particular onion address (and to ease the amount of cleanup we need to do when Ed25519 happens).
Maybe do: "const rend_cache_entry_t *e = NULL;" to catch dumb in the future, though it's fine either way.
Not working for me as of commit 411049d0d44963b8d9ec6f96c8dc62a106d6cc30
Transcript:
authenticate ""
250 OK
setevents hs_desc
250 OK
hsfetch facebookcorewwwi
250 OK
650 HS_DESC REQUESTED facebookcorewwwi NO_AUTH $B53F5DE5FD55C836BED6BDDBFC1DC906B4543821curly wu5uc7ph33qdsgnvet5yesdvvw2bhn6r
650 HS_DESC RECEIVED facebookcorewwwi NO_AUTH $B53F5DE5FD55C836BED6BDDBFC1DC906B4543821curly
getinfo hs/client/desc/id/facebookcorewwwi
551 Not found in cache
I've found found any way of making hs/client/desc/id/anything return anything except "551 Not found in cache" - either by hsfetch command, or by connecting to the HS via socks.