new ControlCommand(commandStr)
Wraps a control command to send over the control port.
Name | Type | Description |
---|---|---|
commandStr | string | Command to send. |
- Source
Members
cmd
PropertiesName | Type | Description |
---|---|---|
cmd | string | Command instance was intialized with. |
- Source
Methods
toString() → {string}
Unwraps the command as a raw string.
- Source
- Type:
- string
(static) ADD_ONION(ports, addOnionOptsopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Description |
---|---|---|---|
ports | string | | Ports to map this onion service to. | |
addOnionOpts | module:bulb/commands~ControlCommand~AddOnionOptions | <optional> | Configuration options. |
- Source
(static) ATTACHSTREAM(streamId, options) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
streamId | string | Stream ID to attach to circuit. |
options | module:bulb/commands~ControlCommand~AttachStreamOptions |
- Source
(static) AUTHCHALLENGE(nonceopt, typeopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
nonce | string | <optional> | "" | Client nonce for challenge. |
type | string | <optional> | "SAFECOOKIE" | The type of challenge. |
- Source
(static) AUTHENTICATE(tokenopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
token | string | <optional> | "" | The auth token to send. |
- Source
(static) CLOSECIRCUIT(circuitId, optionsopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
circuitId | string | Circuit ID to close. | |||||||||||
options | object | <optional> | Properties
|
- Source
(static) CLOSESTREAM(streamId, reasonopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
streamId | string | Stream ID to close. | ||
reason | number | <optional> | 1 | Reason code for closing. |
- Source
(static) DEL_ONION(serviceId) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
serviceId | string | Onion address excluding ".onion". |
- Source
(static) DROPGUARDS() → {module:bulb/commands~ControlCommand}
- Source
(static) EXTENDCIRCUIT(circuitId, purposeopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Description |
---|---|---|---|
circuitId | string | Circuit ID to extend. | |
purpose | string | <optional> | Purpose to set for the circuit. |
- Source
(static) GETCONF(keyword) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
keyword | string | Configuration key to get. |
- Source
(static) GETINFO(keyword) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
keyword | string | Keyword for info to get. |
- Source
(static) HSFETCH(serviceId, serverLongNameopt) → {string}
Name | Type | Attributes | Description |
---|---|---|---|
serviceId | string | Hidden service onion URL without ".onion". | |
serverLongName | string | <optional> | Server name to fetch from. |
- Source
- Type:
- string
(static) HSPOST(descriptor, serverLongNameopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Description |
---|---|---|---|
descriptor | string | Raw hidden service descriptor string. | |
serverLongName | string | <optional> | Server name to post to. |
- Source
(static) LOADCONF(configText) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
configText | string | Sends the torrc configuration to the controller. |
- Source
(static) MAPADDRESS(targetAddr, replaceAddr) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
targetAddr | string | Address to map from. |
replaceAddr | string | Address to map to. |
- Source
(static) POSTDESCRIPTOR(descriptor, options) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
descriptor | Object.<string, string> | Key value pairs for descriptor to post. |
options | module:bulb/commands~ControlCommand~PostDescriptorOptions |
- Source
(static) PROTOCOLINFO() → {module:bulb/commands~ControlCommand}
- Source
(static) QUIT() → {module:bulb/commands~ControlCommand}
- Source
(static) REDIRECTSTREAM(streamId, address, portopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Description |
---|---|---|---|
streamId | string | Stream ID to redirect. | |
address | string | Hostname to redirect to. | |
port | number | <optional> | Port to redirect to. |
- Source
(static) RESETCONF(keyword) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
keyword | string | Configuration key to reset. |
- Source
(static) RESOLVE(address, reverseopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
address | string | Address to resolve. | ||
reverse | boolean | <optional> | false | Do reverse lookup. |
- Source
(static) SAVECONF() → {module:bulb/commands~ControlCommand}
- Source
(static) SETCIRCUITPURPOSE(circuitId, purposeopt) → {module:bulb/commands~ControlCommand}
Name | Type | Attributes | Description |
---|---|---|---|
circuitId | string | Circuit ID to set purpose for. | |
purpose | string | <optional> | Purpose to set for the circuit. |
- Source
(static) SETCONF(keyword, value) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
keyword | string | Configuration key. |
value | string | Configuration value. |
- Source
(static) SETEVENTS(events) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
events | Array.<string> | Names of events that tor should send. |
- Source
(static) SIGNAL(signal) → {module:bulb/commands~ControlCommand}
Name | Type | Description |
---|---|---|
signal | string | module:bulb/commands~ControlCommand~Signal type to send. |
- Source
(static) TAKEOWNERSHIP() → {module:bulb/commands~ControlCommand}
- Source
Type Definitions
AddOnionOptions
- object
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
clientName | string | <optional> | Client auth identifier. | |
clientBlob | string | <optional> | Arbitrary auth data. | |
keyType | string | <optional> | "NEW" | Create a new key or use RSA1024. |
keyBlob | string | <optional> | "BEST" | Key type to create or serialized. |
discardPrivateKey | boolean | <optional> | false | Do not return key. |
detach | boolean | <optional> | false | Keep service running after close. |
basicAuth | boolean | <optional> | false | Use client name and blob auth. |
nonAnonymous | boolean | <optional> | false | Non-anononymous mode. |
virtualPort | number | <optional> | 80 | Virtual port to expose on the hidden service. |
- Source
AttachStreamOptions
- object
Name | Type | Attributes | Description |
---|---|---|---|
circuitId | string | Circuit ID to attach stream to. | |
hopNumber | string | <optional> | Hop number in circuit to attach stream to. |
- Source
PostDescriptorOptions
- object
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options.purpose | string | <optional> | "general" | Set descriptor purpose. |
options.cache | boolean | <optional> | true | Cache the descriptor. |
- Source
Signal
Map of control signals.
- Object.<string, string>
- Source