aboutsummaryrefslogtreecommitdiff
path: root/spec/control-spec/commands.md
diff options
context:
space:
mode:
Diffstat (limited to 'spec/control-spec/commands.md')
-rw-r--r--spec/control-spec/commands.md38
1 files changed, 36 insertions, 2 deletions
diff --git a/spec/control-spec/commands.md b/spec/control-spec/commands.md
index 254633e..f59a548 100644
--- a/spec/control-spec/commands.md
+++ b/spec/control-spec/commands.md
@@ -1,9 +1,11 @@
<a id="control-spec.txt-3"></a>
+
# Commands
All commands are case-insensitive, but most keywords are case-sensitive.
<a id="control-spec.txt-3.1"></a>
+
## SETCONF
Change the value of one or more configuration variables. The syntax is:
@@ -42,6 +44,7 @@ options with a single SETCONF command (e.g. SETCONF ORPort=443
ORListenAddress=9001).
<a id="control-spec.txt-3.2"></a>
+
## RESETCONF
Remove all settings for a given configuration option entirely, assign
@@ -54,6 +57,7 @@ its default. The syntax is:
Otherwise it behaves like SETCONF above.
<a id="control-spec.txt-3.3"></a>
+
## GETCONF
Request the value of zero or more configuration variable(s).
@@ -91,6 +95,7 @@ virtual keyword to get all HiddenServiceDir, HiddenServicePort,
HiddenServiceVersion, and HiddenserviceAuthorizeClient option settings.
<a id="control-spec.txt-3.4"></a>
+
## SETEVENTS
Request the server to inform the client about interesting events. The
@@ -100,7 +105,7 @@ syntax is:
EventCode = 1*(ALPHA / "_") (see section 4.1.x for event types)
-Any events *not* listed in the SETEVENTS line are turned off; thus, sending
+Any events _not_ listed in the SETEVENTS line are turned off; thus, sending
SETEVENTS with an empty body turns off all event reporting.
The server responds with a "250 OK" reply on success, and a "552
@@ -117,6 +122,7 @@ always-on in Tor 0.2.2.1-alpha and later.
Each event is described in more detail in Section 4.1.
<a id="control-spec.txt-3.5"></a>
+
## AUTHENTICATE
Sent from the client to the server. The syntax is:
@@ -163,6 +169,7 @@ case, the controller should just send "AUTHENTICATE" CRLF.
connection after an authentication failure.)
<a id="control-spec.txt-3.6"></a>
+
## SAVECONF
Sent from the client to the server. The syntax is:
@@ -185,6 +192,7 @@ See also the "getinfo config-can-saveconf" command, to tell if the FORCE
flag will be required. (Also introduced in 0.3.1.1-alpha.)
<a id="control-spec.txt-3.7"></a>
+
## SIGNAL
Sent from the client to the server. The syntax is:
@@ -239,6 +247,7 @@ signal that have them.
```
<a id="control-spec.txt-3.8"></a>
+
## MAPADDRESS
Sent from the client to the server. The syntax is:
@@ -325,6 +334,7 @@ Example:
```
<a id="control-spec.txt-3.9"></a>
+
## GETINFO
Sent from the client to the server. The syntax is as for GETCONF:
@@ -963,6 +973,7 @@ ReplyLine. If a value fits on a single line, the format is:
```
<a id="control-spec.txt-3.10"></a>
+
## EXTENDCIRCUIT
Sent from the client to the server. The format is:
@@ -993,6 +1004,7 @@ message body consisting of the CircuitID of the (maybe newly created)
circuit. The syntax is "250" SP "EXTENDED" SP CircuitID CRLF.
<a id="control-spec.txt-3.11"></a>
+
## SETCIRCUITPURPOSE
Sent from the client to the server. The format is:
@@ -1002,6 +1014,7 @@ Sent from the client to the server. The format is:
This changes the circuit's purpose. See EXTENDCIRCUIT above for details.
<a id="control-spec.txt-3.12"></a>
+
## SETROUTERPURPOSE
Sent from the client to the server. The format is:
@@ -1016,6 +1029,7 @@ NOTE: This command was disabled and made obsolete as of Tor
historical interest.
<a id="control-spec.txt-3.13"></a>
+
## ATTACHSTREAM
Sent from the client to the server. The syntax is:
@@ -1057,6 +1071,7 @@ yet, in which case Tor will detach the stream from its current circuit
before proceeding with the new attach request.}
<a id="control-spec.txt-3.14"></a>
+
## POSTDESCRIPTOR
Sent from the client to the server. The syntax is:
@@ -1085,6 +1100,7 @@ whose body explains why the server was not added. If the descriptor
is added, Tor replies with "250 OK".
<a id="control-spec.txt-3.15"></a>
+
## REDIRECTSTREAM
Sent from the client to the server. The syntax is:
@@ -1102,6 +1118,7 @@ a circuit.
Tor replies with "250 OK" on success.
<a id="control-spec.txt-3.16"></a>
+
## CLOSESTREAM
Sent from the client to the server. The syntax is:
@@ -1117,6 +1134,7 @@ Tor replies with "250 OK" on success, or a 512 if there aren't enough
arguments, or a 552 if it doesn't recognize the StreamID or reason.
<a id="control-spec.txt-3.17"></a>
+
## CLOSECIRCUIT
The syntax is:
@@ -1136,12 +1154,14 @@ Tor replies with "250 OK" on success, or a 512 if there aren't enough
arguments, or a 552 if it doesn't recognize the CircuitID.
<a id="control-spec.txt-3.18"></a>
+
## QUIT
Tells the server to hang up on this controller connection. This command
can be used before authenticating.
<a id="control-spec.txt-3.19"></a>
+
## USEFEATURE
Adding additional features to the control protocol sometimes will break
@@ -1191,6 +1211,7 @@ EXTENDED_EVENTS
```
<a id="control-spec.txt-3.20"></a>
+
## RESOLVE
The syntax is
@@ -1209,6 +1230,7 @@ need to listen for ADDRMAP events; see 4.1.7 below.
[Added in Tor 0.2.0.3-alpha]
<a id="control-spec.txt-3.21"></a>
+
## PROTOCOLINFO
The syntax is:
@@ -1285,6 +1307,7 @@ only once!) before AUTHENTICATE.]
[PROTOCOLINFO was not supported before Tor 0.2.0.5-alpha.]
<a id="control-spec.txt-3.22"></a>
+
## LOADCONF
The syntax is:
@@ -1298,6 +1321,7 @@ it had been read from disk.
[LOADCONF was added in Tor 0.2.1.1-alpha.]
<a id="control-spec.txt-3.23"></a>
+
## TAKEOWNERSHIP
The syntax is:
@@ -1347,6 +1371,7 @@ should 'own' that Tor process:
```
<a id="control-spec.txt-3.24"></a>
+
## AUTHCHALLENGE
The syntax is:
@@ -1403,6 +1428,7 @@ used (but only once!) before AUTHENTICATE.]
[AUTHCHALLENGE was added in Tor 0.2.3.13-alpha.]
<a id="control-spec.txt-3.25"></a>
+
## DROPGUARDS
The syntax is:
@@ -1417,6 +1443,7 @@ Tor replies with "250 OK" on success.
[DROPGUARDS was added in Tor 0.2.5.2-alpha.]
<a id="control-spec.txt-3.26"></a>
+
## HSFETCH
The syntax is:
@@ -1473,6 +1500,7 @@ Examples are:
[HS v3 support added 0.4.1.1-alpha]
<a id="control-spec.txt-3.27"></a>
+
## ADD_ONION
The syntax is:
@@ -1655,6 +1683,7 @@ Examples:
[ClientV3Auth support added 0.4.6.1-alpha]
<a id="control-spec.txt-3.28"></a>
+
## DEL_ONION
The syntax is:
@@ -1686,6 +1715,7 @@ number of arguments, or a 552 if it doesn't recognize the ServiceID.
[HS v3 support added 0.3.3.1-alpha]
<a id="control-spec.txt-3.29"></a>
+
## HSPOST
The syntax is:
@@ -1728,6 +1758,7 @@ Examples are:
```
<a id="control-spec.txt-3.30"></a>
+
## ONION_CLIENT_AUTH_ADD
The syntax is:
@@ -1778,6 +1809,7 @@ On success, "250 OK" is returned. Otherwise, the following error codes exist:
```
<a id="control-spec.txt-3.31"></a>
+
## ONION_CLIENT_AUTH_REMOVE
The syntax is:
@@ -1799,6 +1831,7 @@ On success "250 OK" is returned. Otherwise, the following error codes exist:
```
<a id="control-spec.txt-3.32"></a>
+
## ONION_CLIENT_AUTH_VIEW
The syntax is:
@@ -1839,6 +1872,7 @@ On success "250 OK" is returned. Otherwise, the following error codes exist:
[ONION_CLIENT_AUTH_VIEW was added in Tor 0.4.3.1-alpha]
<a id="control-spec.txt-3.33"></a>
+
## DROPOWNERSHIP
The syntax is:
@@ -1859,6 +1893,7 @@ ownership.
[DROPOWNERSHIP was added in Tor 0.4.0.0-alpha]
<a id="control-spec.txt-3.34"></a>
+
## DROPTIMEOUTS
```text
@@ -1873,4 +1908,3 @@ Tor replies with "250 OK" on success. Tor also emits the BUILDTIMEOUT_SET
RESET event right after this "250 OK".
[DROPTIMEOUTS was added in Tor 0.4.5.0-alpha.]
-