2018-09-19 15:22:17 +00:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "utf-8" >
< title > TorProcess - Documentation< / title >
< script src = "scripts/prettify/prettify.js" > < / script >
< script src = "scripts/prettify/lang-css.js" > < / script >
<!-- [if lt IE 9]>
< script src = "//html5shiv.googlecode.com/svn/trunk/html5.js" > < / script >
<![endif]-->
< link type = "text/css" rel = "stylesheet" href = "styles/prettify.css" >
< link type = "text/css" rel = "stylesheet" href = "styles/jsdoc.css" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< / head >
< body >
< input type = "checkbox" id = "nav-trigger" class = "nav-trigger" / >
< label for = "nav-trigger" class = "navicon-button x" >
< div class = "navicon" > < / div >
< / label >
< label for = "nav-trigger" class = "overlay" > < / label >
< nav >
< h2 > < a href = "index.html" > Home< / a > < / h2 > < h3 > Classes< / h3 > < ul > < li > < a href = "ControlServer.html" > ControlServer< / a > < ul class = 'methods' > < li data-type = 'method' > < a href = "ControlServer.html#.instance_info" > instance_info< / a > < / li > < li data-type = 'method' > < a href = "ControlServer.html#close" > close< / a > < / li > < li data-type = 'method' > < a href = "ControlServer.html#createDNSServer" > createDNSServer< / a > < / li > < li data-type = 'method' > < a href = "ControlServer.html#createHTTPServer" > createHTTPServer< / a > < / li > < li data-type = 'method' > < a href = "ControlServer.html#createSOCKSServer" > createSOCKSServer< / a > < / li > < li data-type = 'method' > < a href = "ControlServer.html#createTorPool" > createTorPool< / a > < / li > < li data-type = 'method' > < a href = "ControlServer.html#listen" > listen< / a > < / li > < li data-type = 'method' > < a href = "ControlServer.html#listenTcp" > listenTcp< / a > < / li > < li data-type = 'method' > < a href = "ControlServer.html#listenWs" > listenWs< / a > < / li > < / ul > < / li > < li > < a href = "DNSServer.html" > DNSServer< / a > < ul class = 'methods' > < li data-type = 'method' > < a href = "DNSServer.html#listen" > listen< / a > < / li > < / ul > < / li > < li > < a href = "HTTPServer.html" > HTTPServer< / a > < ul class = 'methods' > < li data-type = 'method' > < a href = "HTTPServer.html#listen" > listen< / a > < / li > < / ul > < / li > < li > < a href = "SOCKSServer.html" > SOCKSServer< / a > < ul class = 'methods' > < li data-type = 'method' > < a href = "SOCKSServer.html#listen" > listen< / a > < / li > < / ul > < / li > < li > < a href = "TorPool.html" > TorPool< / a > < ul class = 'methods' > < li data-type = 'method' > < a href = "TorPool.html#add" > add< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#add_instance_to_group" > add_instance_to_group< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#add_instance_to_group_at" > add_instance_to_group_at< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#add_instance_to_group_by_name" > add_instance_to_group_by_name< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#create" > create< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#create_instance" > create_instance< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#exit" > exit< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#get_config_at" > get_config_at< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#get_config_by_name" > get_config_by_name< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#instance_at" > instance_at< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#instance_by_name" > instance_by_name< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#instances_by_group" > instances_by_group< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#new_identites" > new_identites< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#new_identites_by_group" > new_identites_by_group< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#new_identity_at" > new_identity_at< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#new_identity_by_name" > new_identity_by_name< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#next" > next< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#next_by_group" > next_by_group< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#remove" > remove< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#remove_at" > remove_at< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#remove_by_name" > remove_by_name< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#remove_instance_from_group" > remove_instance_from_group< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#remove_instance_from_group_at" > remove_instance_from_group_at< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#remove_instance_from_group_by_name" > remove_instance_from_group_by_name< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#set_config_all" > set_config_all< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#set_config_at" > set_config_at< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#set_config_by_group" > set_config_by_group< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#set_config_by_name" > set_config_by_name< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#signal_all" > signal_all< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#signal_at" > signal_at< / a > < / li > < li data-type = 'method' > < a href = "TorPool.html#signal_by_group" > signal_by_group< / a > < /li
< / nav >
< div id = "main" >
< h1 class = "page-title" > TorProcess< / h1 >
< section >
< header >
< h2 >
TorProcess
< / h2 >
< div class = "class-description" > Class that represents an individual Tor process.< / div >
< / header >
< article >
< div class = "container-overview" >
< h2 > Constructor< / h2 >
< h4 class = "name" id = "TorProcess" > < span class = "type-signature" > < / span > new TorProcess< span class = "signature" > (tor_path, definition< span class = "signature-attributes" > opt< / span > , granax_options< span class = "signature-attributes" > opt< / span > , logger< span class = "signature-attributes" > opt< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line37" > line 37< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Creates an instance of `TorProcess`
< / div >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Attributes< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > tor_path< / code > < / td >
< td class = "type" >
< span class = "param-type" > string< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > Path to the Tor executable.< / td >
< / tr >
< tr >
< td class = "name" > < code > definition< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "global.html#InstanceDefinition" > InstanceDefinition< / a > < / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > Object containing various options for the instance. See < a href = "global.html#InstanceDefinition" > InstanceDefinition< / a > for more info.< / td >
< / tr >
< tr >
< td class = "name" > < code > granax_options< / code > < / td >
< td class = "type" >
< span class = "param-type" > Object< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > Object containing options that will be passed to granax.< / td >
< / tr >
< tr >
< td class = "name" > < code > logger< / code > < / td >
< td class = "type" >
< span class = "param-type" > Logger< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > A winston logger. If not provided no logging will occur.< / td >
< / tr >
< / tbody >
< / table >
< / div >
< h3 class = "subsection-title" > Extends< / h3 >
< ul >
< li > EventEmitter< / li >
< / ul >
< h3 class = "subsection-title" > Members< / h3 >
< h4 class = "name" id = "control_password" > < span class = "type-signature" > < / span > control_password< span class = "type-signature" > :string< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line78" > line 78< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
The password that will be set for the control protocol.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > string< / span >
< / li >
< / ul >
< h4 class = "name" id = "control_port" > < span class = "type-signature" > (readonly) < / span > control_port< span class = "type-signature" > :number< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line172" > line 172< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Port Tor is bound to for API access.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > number< / span >
< / li >
< / ul >
< h4 class = "name" id = "control_port_connected" > < span class = "type-signature" > < / span > control_port_connected< span class = "type-signature" > :boolean< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line338" > line 338< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Is true when the connected via the control protcol
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > boolean< / span >
< / li >
< / ul >
< h4 class = "name" id = "controller" > < span class = "type-signature" > (readonly) < / span > controller< span class = "type-signature" > :TorController< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line182" > line 182< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Instance of granax.TorController connected to the Tor process.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > TorController< / span >
< / li >
< / ul >
< h4 class = "name" id = "definition" > < span class = "type-signature" > (readonly) < / span > definition< span class = "type-signature" > :string< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line136" > line 136< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
The definition used to create the instance.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > string< / span >
< / li >
< / ul >
< h4 class = "name" id = "dns_port" > < span class = "type-signature" > (readonly) < / span > dns_port< span class = "type-signature" > :number< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line152" > line 152< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Port Tor is bound to for DNS traffic.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > number< / span >
< / li >
< / ul >
< h4 class = "name" id = "granax_options" > < span class = "type-signature" > < / span > granax_options< span class = "type-signature" > :Object< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line70" > line 70< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Object containing options that will be passed to granax.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Object< / span >
< / li >
< / ul >
< h4 class = "name" id = "id" > < span class = "type-signature" > (readonly) < / span > id< span class = "type-signature" > :string< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line108" > line 108< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
The unique identifier assigned to each instance.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > string< / span >
< / li >
< / ul >
< h4 class = "name" id = "instance_group" > < span class = "type-signature" > (readonly) < / span > instance_group< span class = "type-signature" > :< a href = "Array.html" > Array< / a > .< string>< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line116" > line 116< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Groups the instance are currently in.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > < a href = "Array.html" > Array< / a > .< string>< / span >
< / li >
< / ul >
< h4 class = "name" id = "instance_name" > < span class = "type-signature" > (readonly) < / span > instance_name< span class = "type-signature" > :string< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line126" > line 126< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Either the "Name" property of the definition or the < a href = "TorProcess.html#id" > TorProcess#id< / a > property.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > string< / span >
< / li >
< / ul >
< h4 class = "name" id = "ready" > < span class = "type-signature" > (readonly) < / span > ready< span class = "type-signature" > :boolean< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line192" > line 192< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Property identifiyng whether Tor has started.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > boolean< / span >
< / li >
< / ul >
< h4 class = "name" id = "socks_port" > < span class = "type-signature" > (readonly) < / span > socks_port< span class = "type-signature" > :number< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line162" > line 162< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Port Tor is bound to for SOCKS5 traffic.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > number< / span >
< / li >
< / ul >
< h4 class = "name" id = "tor_config" > < span class = "type-signature" > (readonly) < / span > tor_config< span class = "type-signature" > :Object< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line144" > line 144< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
The configuration passed to Tor. The same value as `definition.Config`.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Object< / span >
< / li >
< / ul >
< h4 class = "name" id = "tor_path" > < span class = "type-signature" > < / span > tor_path< span class = "type-signature" > :string< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line62" > line 62< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Path to the Tor executable.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > string< / span >
< / li >
< / ul >
< h3 class = "subsection-title" > Methods< / h3 >
< h4 class = "name" id = "create" > < span class = "type-signature" > (async) < / span > create< span class = "signature" > ()< / span > < span class = "type-signature" > → {Promise.< ChildProcess>}< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line265" > line 265< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Creates the Tor process based on the configuration provided. Promise is resolved when the process has been started.
< / div >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
- The process that has been created.
< / div >
< dl class = "param-type" >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Promise.< ChildProcess>< / span >
< / dd >
< / dl >
< h4 class = "name" id = "exit" > < span class = "type-signature" > (async) < / span > exit< span class = "signature" > ()< / span > < span class = "type-signature" > → {Promise}< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line90" > line 90< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Kills the Tor process.
< / div >
< h5 > Returns:< / h5 >
< dl class = "param-type" >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Promise< / span >
< / dd >
< / dl >
< h4 class = "name" id = "get_config" > < span class = "type-signature" > (async) < / span > get_config< span class = "signature" > (keyword)< / span > < span class = "type-signature" > → {Promise.< < a href = "Array.html" > Array< / a > .< string>>}< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line216" > line 216< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Retrieves a configuration value from the instance via the control protocol.
< / div >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > keyword< / code > < / td >
< td class = "type" >
< span class = "param-type" > string< / span >
< / td >
< td class = "description last" > The name of the configuration property to retrieve.< / td >
< / tr >
< / tbody >
< / table >
< h5 > Throws:< / h5 >
< div class = "param-desc" >
Will throw an error if not connected to the control protocol.
< / div >
< h5 > Returns:< / h5 >
< dl class = "param-type" >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Promise.< < a href = "Array.html" > Array< / a > .< string>>< / span >
< / dd >
< / dl >
< h4 class = "name" id = "new_identity" > < span class = "type-signature" > (async) < / span > new_identity< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line201" > line 201< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Requests a new identity via the control protocol.
< / div >
< h4 class = "name" id = "set_config" > < span class = "type-signature" > (async) < / span > set_config< span class = "signature" > (keyword, value)< / span > < span class = "type-signature" > → {Promise}< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line233" > line 233< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Sets a configuration value for the instance via the control protocol.
< / div >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > keyword< / code > < / td >
< td class = "type" >
< span class = "param-type" > string< / span >
< / td >
< td class = "description last" > The name of the configuration property to retrieve.< / td >
< / tr >
< tr >
< td class = "name" > < code > value< / code > < / td >
< td class = "type" >
< span class = "param-type" > any< / span >
< / td >
< td class = "description last" > Value to set the property to.< / td >
< / tr >
< / tbody >
< / table >
< h5 > Throws:< / h5 >
< div class = "param-desc" >
Will throw an error if not connected to the control protocol.
< / div >
< h5 > Returns:< / h5 >
< dl class = "param-type" >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Promise< / span >
< / dd >
< / dl >
< h4 class = "name" id = "signal" > < span class = "type-signature" > (async) < / span > signal< span class = "signature" > (signal)< / span > < span class = "type-signature" > → {Promise}< / span > < / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line250" > line 250< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
Sends a signal via the control tnterface.
< / div >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > signal< / code > < / td >
< td class = "type" >
< span class = "param-type" > string< / span >
< / td >
< td class = "description last" > The signal to send.< / td >
< / tr >
< / tbody >
< / table >
< h5 > Throws:< / h5 >
< div class = "param-desc" >
Will throw an error if not connected to the control protocol.
< / div >
< h5 > Returns:< / h5 >
< dl class = "param-type" >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Promise< / span >
< / dd >
< / dl >
< h3 class = "subsection-title" > Events< / h3 >
< h4 class = "name" id = "event:control_listen" > control_listen< / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line369" > line 369< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
An event that fires when the Tor process has started listening for control interface traffic.
< / div >
< h4 class = "name" id = "event:controller_ready" > controller_ready< / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line339" > line 339< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
An event that fires when a connection has been established to the control protocol.
< / div >
< h4 class = "name" id = "event:dns_listen" > dns_listen< / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line389" > line 389< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
An event that fires when the Tor process has started listening for DNS traffic.
< / div >
< h4 class = "name" id = "event:error" > error< / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line398" > line 398< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
An event that fires when the Tor process has written an error to stdout, stderr or when an error occurs connecting via the control protocol.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Error< / span >
< / li >
< / ul >
< h5 > Returns:< / h5 >
< dl class = "param-type" >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Error< / span >
< / dd >
< / dl >
< h4 class = "name" id = "event:process_exit" > process_exit< / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line296" > line 296< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
An event that fires when the process has closed.
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > number< / span >
< / li >
< / ul >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > code< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > The exit code from the process.< / td >
< / tr >
< / tbody >
< / table >
< h4 class = "name" id = "event:ready" > ready< / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line359" > line 359< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
An event that fires when the Tor process is fully bootstrapped (and ready for traffic).
< / div >
< h4 class = "name" id = "event:socks_listen" > socks_listen< / h4 >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "TorProcess.js.html" > TorProcess.js< / a > , < a href = "TorProcess.js.html#line379" > line 379< / a >
< / li > < / ul > < / dd >
< / dl >
< div class = "description" >
An event that fires when the Tor process has started listening for SOCKS5 traffic.
< / div >
< / article >
< / section >
< / div >
< br class = "clear" >
< footer >
2018-09-25 16:53:29 +00:00
Documentation generated by < a href = "https://github.com/jsdoc3/jsdoc" > JSDoc 3.5.5< / a > on Tue Sep 25 2018 12:53:23 GMT-0400 (Eastern Daylight Time) using the < a href = "https://github.com/clenemt/docdash" > docdash< / a > theme.
2018-09-19 15:22:17 +00:00
< / footer >
< script > prettyPrint ( ) ; < / script >
< script src = "scripts/linenumber.js" > < / script >
< / body >
< / html >