Methods

(static) ADD_ONION(ports, optionsopt)

Parameters:
NameTypeAttributesDescription
portsarray

Array containing optional virtualPort (defaults to 80) and target ip:port string

optionsobject<optional>
Properties
NameTypeAttributesDefaultDescription
clientNamestring<optional>

Client auth identifier

clientBlobstring<optional>

Arbitrary auth data

keyTypestring<optional>
"NEW"

Create a new key or use RSA1024

keyBlobstring<optional>
"BEST"

Key type to create or serialized

discardPrivateKeyboolean<optional>
false

Do not return key

detachboolean<optional>
false

Keep service running after close

basicAuthboolean<optional>
false

Use client name and blob auth

nonAnonymousboolean<optional>
false

Non-anononymous mode

(static) ATTACHSTREAM(streamId, options) → {string}

Parameters:
NameTypeDescription
streamIdstring
optionsobject
Properties
NameTypeDescription
circuitIdstring
hopNumberstring | null
Returns:
Type: 
string

(static) AUTHCHALLENGE(nonceopt, typeopt) → {string}

Parameters:
NameTypeAttributesDefaultDescription
noncestring<optional>
""

Client nonce for challenge

typestring<optional>
"SAFECOOKIE"

The type of challenge

Returns:
Type: 
string

(static) AUTHENTICATE(tokenopt) → {string}

Parameters:
NameTypeAttributesDefaultDescription
tokenstring<optional>
""

The auth token

Returns:
Type: 
string

(static) CLOSECIRCUIT(circuitId, optionsopt) → {string}

Parameters:
NameTypeAttributesDescription
circuitIdstring
optionsobject<optional>
Properties
NameTypeAttributesDefaultDescription
ifUnusedboolean<optional>
false
Returns:
Type: 
string

(static) CLOSESTREAM(streamId, reasonopt) → {string}

Parameters:
NameTypeAttributesDefaultDescription
streamIdstring
reasonnumber<optional>
1
Returns:
Type: 
string

(static) DEL_ONION(serviceId) → {string}

Parameters:
NameTypeDescription
serviceIdstring
Returns:
Type: 
string

(static) DROPGUARDS() → {string}

Returns:
Type: 
string

(static) EXTENDCIRCUIT(circuitId) → {string}

Parameters:
NameTypeDescription
circuitIdstring
Returns:
Type: 
string

(static) GETCONF(keyword) → {string}

Parameters:
NameTypeDescription
keywordstring
Returns:
Type: 
string

(static) GETINFO(keyword) → {string}

Parameters:
NameTypeDescription
keywordstring
Returns:
Type: 
string

(static) HSFETCH(serviceId, serverLongNameopt) → {string}

Parameters:
NameTypeAttributesDescription
serviceIdstring
serverLongNamestring<optional>
Returns:
Type: 
string

(static) HSPOST(descriptor, serverLongNameopt) → {string}

Parameters:
NameTypeAttributesDescription
descriptorstring
serverLongNamestring<optional>
Returns:
Type: 
string

(static) LOADCONF(configText) → {string}

Parameters:
NameTypeDescription
configTextstring
Returns:
Type: 
string

(static) MAPADDRESS(targetAddr, replaceAddr) → {string}

Parameters:
NameTypeDescription
targetAddrstring
replaceAddrstring
Returns:
Type: 
string

(static) POSTDESCRIPTOR(descriptor, options) → {string}

Parameters:
NameTypeDescription
descriptorobject
optionsobject
Properties
NameTypeAttributesDefaultDescription
purposestring<optional>
"general"
cacheboolean<optional>
true
Returns:
Type: 
string

(static) PROTOCOLINFO() → {string}

Returns:
Type: 
string

(static) QUIT() → {string}

Returns:
Type: 
string

(static) REDIRECTSTREAM(streamId, address, portopt) → {string}

Parameters:
NameTypeAttributesDescription
streamIdstring
addressstring
portnumber<optional>
Returns:
Type: 
string

(static) RESETCONF(keyword) → {string}

Parameters:
NameTypeDescription
keywordstring
Returns:
Type: 
string

(static) RESOLVE(address, reverseopt) → {string}

Parameters:
NameTypeAttributesDefaultDescription
addressstring
reverseboolean<optional>
false
Returns:
Type: 
string

(static) SAVECONF() → {string}

Returns:
Type: 
string

(static) SETCIRCUITPURPOSE(circuitId, purpose)

Parameters:
NameTypeDescription
circuitIdstring
purposestring

(static) SETCONF(keyword, value) → {string}

Parameters:
NameTypeDescription
keywordstring
valuestring
Returns:
Type: 
string

(static) SETEVENTS(events) → {string}

Parameters:
NameTypeDescription
eventsArray.<string>
Returns:
Type: 
string

(static) SIGNAL() → {string}

Returns:
Type: 
string

(static) TAKEOWNERSHIP() → {string}

Returns:
Type: 
string

(inner) _addOnionPortsStringToCommand(ports, options, command)

Parameters:
NameTypeDescription
portsarray
optionsobject
commandarray

(inner) _addOnionPortsToCommand(ports, options, command)

Parameters:
NameTypeDescription
portsarray
optionsobject
commandarray