Skip to content
Snippets Groups Projects
Commit ba30c1df authored by Donncha O'Cearbhaill's avatar Donncha O'Cearbhaill Committed by Yawning Angel
Browse files

Add control spec entry for HSPOST, and update HS_DESC events. (#3523)

parent f5ff3691
Branches
No related tags found
No related merge requests found
......@@ -1400,6 +1400,36 @@
[DEL_ONION was added in Tor 0.2.7.1-alpha.]
3.29. HSPOST
The syntax is:
"+HSPOST" *[SP "SERVER=" Server] CRLF Descriptor CRLF "." CRLF
Server = LongName
Descriptor = The text of the descriptor formatted as specified
in rend-spec.txt section 1.3.
This command launches a hidden service descriptor upload to the specified
HSDirs. If one or more Server arguments are provided, an upload is triggered
on each of them in parallel. If no Server options are provided, it behaves
like a normal HS descriptor upload and will upload to the set of responsible
HS directories.
If any value is unrecognized, a 552 error is returned and the command is
stopped. If there is an error in parsing the descriptor, the server
must send a "554 Invalid descriptor" reply.
On success, Tor replies "250 OK" then Tor MUST eventually follow
this with a HS_DESC event with the result for each upload location.
Examples are:
C: +HSPOST SERVER=9695DFC35FFEB861329B9F1AB04C46397020CE31
[DESCRIPTOR]
.
S: 250 OK
[HSPOST was added in Tor 0.2.7.1-alpha]
4. Replies
Reply codes follow the same 3-character format as used by SMTP, with the
......@@ -2690,18 +2720,20 @@
The syntax is:
"650" SP "HS_DESC" SP Action SP HSAddress SP AuthType SP HsDir [SP DescriptorID]
[SP "REASON=" Reason]
"650" SP "HS_DESC" SP Action SP HSAddress SP AuthType SP HsDir
[SP DescriptorID] [SP "REASON=" Reason]
Action = "REQUESTED" / "RECEIVED" / "IGNORE" / "FAILED"
HSAddress = 16*Base32Character / "UNKNOWN"
Action = "REQUESTED" / "UPLOAD" / "RECEIVED" / "UPLOADED" / "IGNORE" /
"FAILED"
HSAddress = 16*Base32Character
AuthType = "NO_AUTH" / "BASIC_AUTH" / "STEALTH_AUTH" / "UNKNOWN"
HsDir = LongName / Fingerprint
DescriptorID = 32*Base32Character
Reason = "BAD_DESC" / "QUERY_REJECTED" / "NOT_FOUND" / "UNEXPECTED"
Reason = "BAD_DESC" / "QUERY_REJECTED" / "UPLOAD_REJECTED" / "NOT_FOUND" /
"UNEXPECTED"
These events will be triggerred when required HiddenService descriptor is
not found in the cache and a fetch from network is performed.
not found in the cache and a fetch or upload with the network is performed.
If the fetch was triggered with only a DescriptorID (using the HSFETCH
command for instance), the HSAddress only appears in the Action=RECEIVED
......@@ -2718,6 +2750,7 @@
values of Reason are:
- "BAD_DESC" - descriptor was retrieved, but found to be unparsable.
- "QUERY_REJECTED" - query was rejected by HS directory.
- "UPLOAD_REJECTED" - descriptor was rejected by HS directory.
- "NOT_FOUND" - HS descriptor with given identifier was not found.
- "UNEXPECTED" - nature of failure is unknown.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment