Module: granax/commands

Source:

Methods


<static> ADD_ONION(ports [, options])

Parameters:
Name Type Argument Description
ports array Array containing optional virtualPort (defaults to 80) and target ip:port string
options object <optional>
Properties
Name Type Argument 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
Source:

<static> ATTACHSTREAM(streamId, options)

Parameters:
Name Type Description
streamId string
options object
Properties
Name Type Description
circuitId string
hopNumber string | null
Source:
Returns:
Type
string

<static> AUTHCHALLENGE( [nonce] [, type])

Parameters:
Name Type Argument Default Description
nonce string <optional>
"" Client nonce for challenge
type string <optional>
"SAFECOOKIE" The type of challenge
Source:
Returns:
Type
string

<static> AUTHENTICATE( [token])

Parameters:
Name Type Argument Default Description
token string <optional>
"" The auth token
Source:
Returns:
Type
string

<static> CLOSECIRCUIT(circuitId [, options])

Parameters:
Name Type Argument Description
circuitId string
options object <optional>
Properties
Name Type Argument Default Description
ifUnused boolean <optional>
false
Source:
Returns:
Type
string

<static> CLOSESTREAM(streamId [, reason])

Parameters:
Name Type Argument Default Description
streamId string
reason number <optional>
1
Source:
Returns:
Type
string

<static> DEL_ONION(serviceId)

Parameters:
Name Type Description
serviceId string
Source:
Returns:
Type
string

<static> DROPGUARDS()

Source:
Returns:
Type
string

<static> EXTENDCIRCUIT(circuitId)

Parameters:
Name Type Description
circuitId string
Source:
Returns:
Type
string

<static> GETCONF(keyword)

Parameters:
Name Type Description
keyword string
Source:
Returns:
Type
string

<static> GETINFO(keyword)

Parameters:
Name Type Description
keyword string
Source:
Returns:
Type
string

<static> HSFETCH(serviceId [, serverLongName])

Parameters:
Name Type Argument Description
serviceId string
serverLongName string <optional>
Source:
Returns:
Type
string

<static> HSPOST(descriptor [, serverLongName])

Parameters:
Name Type Argument Description
descriptor string
serverLongName string <optional>
Source:
Returns:
Type
string

<static> LOADCONF(configText)

Parameters:
Name Type Description
configText string
Source:
Returns:
Type
string

<static> MAPADDRESS(targetAddr, replaceAddr)

Parameters:
Name Type Description
targetAddr string
replaceAddr string
Source:
Returns:
Type
string

<static> POSTDESCRIPTOR(descriptor, options)

Parameters:
Name Type Description
descriptor object
options object
Properties
Name Type Argument Default Description
purpose string <optional>
"general"
cache boolean <optional>
true
Source:
Returns:
Type
string

<static> PROTOCOLINFO()

Source:
Returns:
Type
string

<static> QUIT()

Source:
Returns:
Type
string

<static> REDIRECTSTREAM(streamId, address [, port])

Parameters:
Name Type Argument Description
streamId string
address string
port number <optional>
Source:
Returns:
Type
string

<static> RESETCONF(keyword)

Parameters:
Name Type Description
keyword string
Source:
Returns:
Type
string

<static> RESOLVE(address [, reverse])

Parameters:
Name Type Argument Default Description
address string
reverse boolean <optional>
false
Source:
Returns:
Type
string

<static> SAVECONF()

Source:
Returns:
Type
string

<static> SETCIRCUITPURPOSE(circuitId, purpose)

Parameters:
Name Type Description
circuitId string
purpose string
Source:

<static> SETCONF(keyword, value)

Parameters:
Name Type Description
keyword string
value string
Source:
Returns:
Type
string

<static> SETEVENTS(events)

Parameters:
Name Type Description
events Array.<string>
Source:
Returns:
Type
string

<static> SIGNAL()

Source:
Returns:
Type
string

<static> TAKEOWNERSHIP()

Source:
Returns:
Type
string

<inner> _addOnionPortsStringToCommand(ports, options, command)

Parameters:
Name Type Description
ports array
options object
command array
Source:

<inner> _addOnionPortsToCommand(ports, options, command)

Parameters:
Name Type Description
ports array
options object
command array
Source: