tor_extend 1.0.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Change.log +8 -6
- data/ReadME.txt +68 -9
- data/doc/ReadME_txt.html +100 -12
- data/doc/Tor.html +5 -0
- data/doc/Tor/Bridge.html +4 -0
- data/doc/Tor/CachedDesc.html +10 -6
- data/doc/Tor/Circuit.html +791 -0
- data/doc/Tor/Constants.html +10 -0
- data/doc/Tor/LongCircuit.html +474 -0
- data/doc/Tor/Router.html +4 -0
- data/doc/Tor/StatsObj.html +4 -0
- data/doc/Tor/TController.html +85 -33
- data/doc/created.rid +7 -6
- data/doc/index.html +4 -0
- data/doc/js/search_index.js +1 -1
- data/doc/lib/circuits_rb.html +97 -0
- data/doc/lib/constants_rb.html +4 -0
- data/doc/lib/httpmod_rb.html +4 -0
- data/doc/lib/tcontroller_rb.html +4 -0
- data/doc/lib/tor_extend_rb.html +4 -0
- data/doc/lib/tstats_rb.html +4 -0
- data/doc/table_of_contents.html +50 -0
- data/lib/circuits.rb +370 -0
- data/lib/constants.rb +4 -0
- data/lib/tcontroller.rb +30 -10
- data/lib/tor_extend.rb +4 -0
- data/tor_extend.gemspec +17 -4
- metadata +42 -14
data/doc/Tor/Router.html
CHANGED
@@ -89,8 +89,12 @@
|
|
89
89
|
|
90
90
|
<li><a href="../Tor/CachedDesc.html">Tor::CachedDesc</a>
|
91
91
|
|
92
|
+
<li><a href="../Tor/Circuit.html">Tor::Circuit</a>
|
93
|
+
|
92
94
|
<li><a href="../Tor/Constants.html">Tor::Constants</a>
|
93
95
|
|
96
|
+
<li><a href="../Tor/LongCircuit.html">Tor::LongCircuit</a>
|
97
|
+
|
94
98
|
<li><a href="../Tor/Router.html">Tor::Router</a>
|
95
99
|
|
96
100
|
<li><a href="../Tor/StatsObj.html">Tor::StatsObj</a>
|
data/doc/Tor/StatsObj.html
CHANGED
@@ -135,8 +135,12 @@
|
|
135
135
|
|
136
136
|
<li><a href="../Tor/CachedDesc.html">Tor::CachedDesc</a>
|
137
137
|
|
138
|
+
<li><a href="../Tor/Circuit.html">Tor::Circuit</a>
|
139
|
+
|
138
140
|
<li><a href="../Tor/Constants.html">Tor::Constants</a>
|
139
141
|
|
142
|
+
<li><a href="../Tor/LongCircuit.html">Tor::LongCircuit</a>
|
143
|
+
|
140
144
|
<li><a href="../Tor/Router.html">Tor::Router</a>
|
141
145
|
|
142
146
|
<li><a href="../Tor/StatsObj.html">Tor::StatsObj</a>
|
data/doc/Tor/TController.html
CHANGED
@@ -70,6 +70,8 @@
|
|
70
70
|
|
71
71
|
<ul class="link-list">
|
72
72
|
|
73
|
+
<li><a href="#method-c-new">::new</a>
|
74
|
+
|
73
75
|
<li><a href="#method-i-attach_stream">#attach_stream</a>
|
74
76
|
|
75
77
|
<li><a href="#method-i-bridges">#bridges</a>
|
@@ -135,8 +137,12 @@
|
|
135
137
|
|
136
138
|
<li><a href="../Tor/CachedDesc.html">Tor::CachedDesc</a>
|
137
139
|
|
140
|
+
<li><a href="../Tor/Circuit.html">Tor::Circuit</a>
|
141
|
+
|
138
142
|
<li><a href="../Tor/Constants.html">Tor::Constants</a>
|
139
143
|
|
144
|
+
<li><a href="../Tor/LongCircuit.html">Tor::LongCircuit</a>
|
145
|
+
|
140
146
|
<li><a href="../Tor/Router.html">Tor::Router</a>
|
141
147
|
|
142
148
|
<li><a href="../Tor/StatsObj.html">Tor::StatsObj</a>
|
@@ -203,6 +209,55 @@ href="https://gitweb.torproject.org/torspec.git/tree">gitweb.torproject.org/tors
|
|
203
209
|
|
204
210
|
<!-- Methods -->
|
205
211
|
|
212
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
213
|
+
<h3 class="section-header">Public Class Methods</h3>
|
214
|
+
|
215
|
+
|
216
|
+
<div id="method-c-new" class="method-detail ">
|
217
|
+
|
218
|
+
<div class="method-heading">
|
219
|
+
<span class="method-name">new</span><span
|
220
|
+
class="method-args">(options = {}, &block)</span>
|
221
|
+
<span class="method-click-advice">click to toggle source</span>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
<div class="method-description">
|
226
|
+
|
227
|
+
<p>@param [Hash{Symbol => Object}] options @option options [String, to_s]
|
228
|
+
:host (“127.0.0.1”) @option options [Integer, to_i] :port (9051)
|
229
|
+
@option options [String, to_s] :cookie (nil) @option options [Integer,
|
230
|
+
to_i] :version (PROTOCOL_VERSION)</p>
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
<div class="method-source-code" id="new-source">
|
235
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 42</span>
|
236
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span> = {}, &<span class="ruby-identifier">block</span>)
|
237
|
+
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>
|
238
|
+
<span class="ruby-ivar">@host</span> = (<span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:host</span>) <span class="ruby-operator">||</span> <span class="ruby-string">'127.0.0.1'</span>).<span class="ruby-identifier">to_s</span>
|
239
|
+
<span class="ruby-ivar">@port</span> = (<span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:port</span>) <span class="ruby-operator">||</span> <span class="ruby-value">9051</span>).<span class="ruby-identifier">to_i</span>
|
240
|
+
<span class="ruby-ivar">@version</span> = (<span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:version</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">PROTOCOL_VERSION</span>).<span class="ruby-identifier">to_i</span>
|
241
|
+
<span class="ruby-ivar">@passwd</span> = (<span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:password</span>) <span class="ruby-operator">||</span> <span class="ruby-string">''</span>).<span class="ruby-identifier">to_s</span>
|
242
|
+
<span class="ruby-identifier">connect</span>
|
243
|
+
<span class="ruby-identifier">authenticate</span> <span class="ruby-node">"\"#{@passwd}\""</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span> <span class="ruby-ivar">@passwd</span> <span class="ruby-operator">!=</span> <span class="ruby-string">""</span>
|
244
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
|
245
|
+
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-keyword">self</span>)
|
246
|
+
<span class="ruby-identifier">quit</span>
|
247
|
+
<span class="ruby-keyword">end</span>
|
248
|
+
<span class="ruby-keyword">end</span></pre>
|
249
|
+
</div><!-- new-source -->
|
250
|
+
|
251
|
+
</div>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</div><!-- new-method -->
|
257
|
+
|
258
|
+
|
259
|
+
</section><!-- public-class-method-details -->
|
260
|
+
|
206
261
|
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
207
262
|
<h3 class="section-header">Public Instance Methods</h3>
|
208
263
|
|
@@ -211,7 +266,7 @@ href="https://gitweb.torproject.org/torspec.git/tree">gitweb.torproject.org/tors
|
|
211
266
|
|
212
267
|
<div class="method-heading">
|
213
268
|
<span class="method-name">attach_stream</span><span
|
214
|
-
class="method-args">(stream_no, cir_num
|
269
|
+
class="method-args">(stream_no, cir_num ,*hop_count)</span>
|
215
270
|
<span class="method-click-advice">click to toggle source</span>
|
216
271
|
</div>
|
217
272
|
|
@@ -223,13 +278,13 @@ href="https://gitweb.torproject.org/torspec.git/tree">gitweb.torproject.org/tors
|
|
223
278
|
|
224
279
|
|
225
280
|
<div class="method-source-code" id="attach_stream-source">
|
226
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
227
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">attach_stream</span>(<span class="ruby-identifier">stream_no</span>, <span class="ruby-identifier">cir_num</span>
|
228
|
-
<span class="ruby-
|
229
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">hop_count</span
|
281
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 266</span>
|
282
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">attach_stream</span>(<span class="ruby-identifier">stream_no</span>, <span class="ruby-identifier">cir_num</span> ,*<span class="ruby-identifier">hop_count</span>)
|
283
|
+
<span class="ruby-comment"># puts "attachstream #{cir_num}\n"</span>
|
284
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">hop_count</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">hop_count</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
230
285
|
<span class="ruby-identifier">sr</span>(<span class="ruby-value">:attachstream</span>,<span class="ruby-node">"#{stream_no} #{cir_num}"</span>)
|
231
286
|
<span class="ruby-keyword">else</span>
|
232
|
-
<span class="ruby-identifier">sr</span>(<span class="ruby-value">:attachstream</span>,<span class="ruby-node">"#{stream_no} #{cir_num} HOP=#{hop_count}"</span>)
|
287
|
+
<span class="ruby-identifier">sr</span>(<span class="ruby-value">:attachstream</span>,<span class="ruby-node">"#{stream_no} #{cir_num} HOP=#{hop_count[0]}"</span>)
|
233
288
|
<span class="ruby-keyword">end</span>
|
234
289
|
<span class="ruby-keyword">end</span></pre>
|
235
290
|
</div><!-- attach_stream-source -->
|
@@ -261,7 +316,7 @@ href="https://gitweb.torproject.org/torspec.git/tree">gitweb.torproject.org/tors
|
|
261
316
|
|
262
317
|
|
263
318
|
<div class="method-source-code" id="bridges-source">
|
264
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
319
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 248</span>
|
265
320
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">bridges</span>
|
266
321
|
<span class="ruby-constant">Bridges</span>.<span class="ruby-identifier">all</span>
|
267
322
|
<span class="ruby-keyword">end</span></pre>
|
@@ -296,7 +351,7 @@ href="https://gitweb.torproject.org/torspec.git/tree">gitweb.torproject.org/tors
|
|
296
351
|
|
297
352
|
|
298
353
|
<div class="method-source-code" id="cir_status-source">
|
299
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
354
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 63</span>
|
300
355
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">cir_status</span>
|
301
356
|
<span class="ruby-identifier">cirstatus</span>=<span class="ruby-identifier">getinfo</span>(<span class="ruby-string">"circuit-status"</span>)
|
302
357
|
<span class="ruby-keyword">end</span></pre>
|
@@ -330,7 +385,7 @@ href="https://gitweb.torproject.org/torspec.git/tree">gitweb.torproject.org/tors
|
|
330
385
|
|
331
386
|
|
332
387
|
<div class="method-source-code" id="closeallcircuits-source">
|
333
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
388
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 81</span>
|
334
389
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">closeallcircuits</span>
|
335
390
|
<span class="ruby-identifier">x</span>=<span class="ruby-identifier">cir_status</span>
|
336
391
|
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">x</span>.<span class="ruby-identifier">empty?</span>
|
@@ -370,7 +425,7 @@ href="https://gitweb.torproject.org/torspec.git/tree">gitweb.torproject.org/tors
|
|
370
425
|
|
371
426
|
|
372
427
|
<div class="method-source-code" id="closecircuit-source">
|
373
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
428
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 72</span>
|
374
429
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">closecircuit</span> (<span class="ruby-identifier">circnum</span>)
|
375
430
|
<span class="ruby-identifier">errorstate</span>,<span class="ruby-identifier">ans</span>=<span class="ruby-identifier">sr</span>(<span class="ruby-value">:closecircuit</span>,<span class="ruby-node">" #{circnum}"</span>)
|
376
431
|
<span class="ruby-keyword">end</span></pre>
|
@@ -402,7 +457,7 @@ href="https://gitweb.torproject.org/torspec.git/tree">gitweb.torproject.org/tors
|
|
402
457
|
|
403
458
|
|
404
459
|
<div class="method-source-code" id="ds-source">
|
405
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
460
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 95</span>
|
406
461
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">ds</span>
|
407
462
|
<span class="ruby-identifier">reply</span>=[]
|
408
463
|
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">getinfo</span>(<span class="ruby-string">"ns/all"</span>)
|
@@ -452,7 +507,7 @@ created if cir_num == 0.</p>
|
|
452
507
|
|
453
508
|
|
454
509
|
<div class="method-source-code" id="extendcir-source">
|
455
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
510
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 120</span>
|
456
511
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">extendcir</span>(<span class="ruby-identifier">circnum</span>,<span class="ruby-identifier">or_list</span>)
|
457
512
|
<span class="ruby-identifier">argor</span>=<span class="ruby-node">" #{circnum} #{or_list.join(',')}"</span>
|
458
513
|
<span class="ruby-identifier">extendcir</span>=<span class="ruby-identifier">send_command</span>(<span class="ruby-value">:extendcircuit</span>,<span class="ruby-identifier">argor</span>)
|
@@ -510,7 +565,7 @@ Tor::TController.extendcir_slowly(testarray)</pre>
|
|
510
565
|
|
511
566
|
|
512
567
|
<div class="method-source-code" id="extendcir_slowly-source">
|
513
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
568
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 149</span>
|
514
569
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">extendcir_slowly</span>(<span class="ruby-identifier">orarray</span>)
|
515
570
|
<span class="ruby-identifier">ordelay</span> = <span class="ruby-keyword">defined?</span>(<span class="ruby-constant">EXTEND_DELAY</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">EXTEND_DELAY</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Constants</span><span class="ruby-operator">::</span><span class="ruby-constant">EXTEND_DELAY</span>
|
516
571
|
<span class="ruby-identifier">cirnum</span> = <span class="ruby-value">0</span>
|
@@ -553,7 +608,7 @@ Tor::TController.extendcir_slowly(testarray)</pre>
|
|
553
608
|
|
554
609
|
<div class="method-heading">
|
555
610
|
<span class="method-name">get_bridges</span><span
|
556
|
-
class="method-args">(
|
611
|
+
class="method-args">(cacheddesc, *config)</span>
|
557
612
|
<span class="method-click-advice">click to toggle source</span>
|
558
613
|
</div>
|
559
614
|
|
@@ -569,10 +624,6 @@ is fo the form:</p>
|
|
569
624
|
:bridgeport}]. The types can be one of ‘tor’, ‘polipo’, ‘socks’, ‘http’,
|
570
625
|
‘https’,nil, ‘none’.</p>
|
571
626
|
|
572
|
-
<pre class="ruby"><span class="ruby-identifier">torctrl_cirnum</span> <span class="ruby-identifier">must</span> <span class="ruby-identifier">have</span> <span class="ruby-identifier">the</span> <span class="ruby-identifier">form</span><span class="ruby-operator">:</span>
|
573
|
-
<span class="ruby-identifier">torctrl_cirnum</span> ={:<span class="ruby-identifier">torctrl=</span><span class="ruby-operator">></span><span class="ruby-constant">Tor</span><span class="ruby-operator">::</span><span class="ruby-constant">TController</span>, :<span class="ruby-identifier">cirnum=</span><span class="ruby-operator">></span><span class="ruby-identifier">cirnum</span>,:<span class="ruby-identifier">hop=</span><span class="ruby-operator">></span><span class="ruby-identifier">hopcount</span>}
|
574
|
-
</pre>
|
575
|
-
|
576
627
|
<p><strong>Get 3 bridges</strong></p>
|
577
628
|
|
578
629
|
<pre class="ruby"><span class="ruby-constant">Tor</span><span class="ruby-operator">::</span><span class="ruby-constant">TController</span>.<span class="ruby-identifier">get_bridges</span>( {:<span class="ruby-identifier">proxytype=</span><span class="ruby-operator">></span><span class="ruby-string">'tor'</span>,:<span class="ruby-identifier">proxyport=</span><span class="ruby-operator">></span><span class="ruby-value">9050</span>,:<span class="ruby-identifier">proxyaddr=</span><span class="ruby-operator">></span><span class="ruby-string">'127.0.0.1'</span>} )
|
@@ -581,8 +632,9 @@ is fo the form:</p>
|
|
581
632
|
|
582
633
|
|
583
634
|
<div class="method-source-code" id="get_bridges-source">
|
584
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
585
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_bridges</span>(<span class="ruby-identifier">
|
635
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 187</span>
|
636
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_bridges</span>(<span class="ruby-identifier">cacheddesc</span>, *<span class="ruby-identifier">config</span>)
|
637
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span> <span class="ruby-string">"https://bridges.torproject.org/"</span>
|
586
638
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">empty?</span>
|
587
639
|
<span class="ruby-identifier">proxyconfig</span>={<span class="ruby-value">:type=</span><span class="ruby-operator">></span><span class="ruby-string">'tor'</span> ,<span class="ruby-value">:port=</span><span class="ruby-operator">></span><span class="ruby-value">9050</span>,<span class="ruby-value">:addr=</span><span class="ruby-operator">></span><span class="ruby-string">'127.0.0.1'</span>}
|
588
640
|
<span class="ruby-keyword">else</span>
|
@@ -619,7 +671,7 @@ is fo the form:</p>
|
|
619
671
|
<span class="ruby-identifier">bridgeip</span>,<span class="ruby-identifier">bridgeport</span>= <span class="ruby-identifier">eachbridge</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">':'</span>)
|
620
672
|
<span class="ruby-identifier">x</span>=<span class="ruby-constant">Bridge</span>.<span class="ruby-identifier">where</span>(<span class="ruby-value">:ipaddr=</span><span class="ruby-operator">></span><span class="ruby-identifier">bridgeip</span>, <span class="ruby-value">:port</span> =<span class="ruby-operator">></span><span class="ruby-identifier">bridgeport</span>)
|
621
673
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">empty?</span>
|
622
|
-
<span class="ruby-keyword">if</span> (<span class="ruby-identifier">bridge_geoip</span>=<span class="ruby-identifier">cacheddesc</span>.<span class="ruby-identifier">get_geoiprecord</span>(<span class="ruby-identifier">bridgeip</span>)).<span class="ruby-identifier">nil?</span>
|
674
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">cacheddesc</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">or</span> (<span class="ruby-identifier">bridge_geoip</span>=<span class="ruby-identifier">cacheddesc</span>.<span class="ruby-identifier">get_geoiprecord</span>(<span class="ruby-identifier">bridgeip</span>)).<span class="ruby-identifier">nil?</span>
|
623
675
|
<span class="ruby-constant">Bridge</span>.<span class="ruby-identifier">create</span>(<span class="ruby-value">:ipaddr=</span><span class="ruby-operator">></span><span class="ruby-identifier">bridgeip</span>, <span class="ruby-value">:port</span> =<span class="ruby-operator">></span><span class="ruby-identifier">bridgeport</span>,
|
624
676
|
<span class="ruby-value">:lat=</span><span class="ruby-operator">></span><span class="ruby-value">0</span>, <span class="ruby-value">:lng=</span><span class="ruby-operator">></span><span class="ruby-value">0</span>)
|
625
677
|
<span class="ruby-keyword">else</span>
|
@@ -636,7 +688,7 @@ is fo the form:</p>
|
|
636
688
|
<span class="ruby-identifier">respcode</span>=<span class="ruby-keyword">nil</span>
|
637
689
|
<span class="ruby-identifier">bridges</span>=[]
|
638
690
|
<span class="ruby-keyword">end</span>
|
639
|
-
<span class="ruby-identifier">bridges</span> <span class="ruby-comment">#Return array of all bridges</span>
|
691
|
+
<span class="ruby-identifier">bridges</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">?</span> [] <span class="ruby-operator">:</span> <span class="ruby-identifier">bridges</span> <span class="ruby-comment">#Return array of all bridges</span>
|
640
692
|
<span class="ruby-keyword">end</span></pre>
|
641
693
|
</div><!-- get_bridges-source -->
|
642
694
|
|
@@ -670,7 +722,7 @@ is fo the form:</p>
|
|
670
722
|
|
671
723
|
|
672
724
|
<div class="method-source-code" id="get_entryguards-source">
|
673
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
725
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 282</span>
|
674
726
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_entryguards</span>
|
675
727
|
<span class="ruby-identifier">rslt</span> = <span class="ruby-identifier">getinfo</span> <span class="ruby-string">"entry-guards"</span>
|
676
728
|
<span class="ruby-identifier">reply</span> = <span class="ruby-identifier">rslt</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">eachguard</span><span class="ruby-operator">|</span>
|
@@ -711,7 +763,7 @@ href="TController.html#method-i-get_bridges">#get_bridges</a> command</p>
|
|
711
763
|
|
712
764
|
|
713
765
|
<div class="method-source-code" id="get_httperrors-source">
|
714
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
766
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 298</span>
|
715
767
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_httperrors</span>
|
716
768
|
<span class="ruby-ivar">@myhttperrors</span>
|
717
769
|
<span class="ruby-keyword">end</span></pre>
|
@@ -751,7 +803,7 @@ Example of the properties include: <em>Fast</em>, <em>Guard</em>,
|
|
751
803
|
|
752
804
|
|
753
805
|
<div class="method-source-code" id="get_purposeip-source">
|
754
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
806
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 310</span>
|
755
807
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_purposeip</span>(<span class="ruby-identifier">nodetype</span>)
|
756
808
|
<span class="ruby-identifier">reply</span>=[]
|
757
809
|
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">getinfo</span>(<span class="ruby-string">"ns/all"</span>)
|
@@ -812,7 +864,7 @@ using</strong></p>
|
|
812
864
|
|
813
865
|
|
814
866
|
<div class="method-source-code" id="getconf-source">
|
815
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
867
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 342</span>
|
816
868
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">getconf</span>(<span class="ruby-identifier">confname</span>)
|
817
869
|
<span class="ruby-identifier">send_command</span>(<span class="ruby-value">:getconf</span>, <span class="ruby-identifier">confname</span>)
|
818
870
|
<span class="ruby-identifier">reply</span>=[]
|
@@ -854,7 +906,7 @@ href="../Tor.html">Tor</a></strong></p>
|
|
854
906
|
|
855
907
|
|
856
908
|
<div class="method-source-code" id="getinfo-source">
|
857
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
909
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 359</span>
|
858
910
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">getinfo</span>(*<span class="ruby-identifier">args</span>)
|
859
911
|
<span class="ruby-identifier">errorcode</span>,<span class="ruby-identifier">ans</span> = <span class="ruby-identifier">sr</span>(<span class="ruby-value">:getinfo</span>,*<span class="ruby-identifier">args</span>)
|
860
912
|
<span class="ruby-identifier">ans</span>
|
@@ -891,7 +943,7 @@ routers that have not been marked as down.</p>
|
|
891
943
|
|
892
944
|
|
893
945
|
<div class="method-source-code" id="net_status-source">
|
894
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
946
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 369</span>
|
895
947
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">net_status</span>
|
896
948
|
<span class="ruby-keyword">case</span> <span class="ruby-identifier">version</span>
|
897
949
|
<span class="ruby-keyword">when</span> <span class="ruby-regexp">/0.2.[01]/</span>
|
@@ -926,14 +978,14 @@ routers that have not been marked as down.</p>
|
|
926
978
|
|
927
979
|
|
928
980
|
<div class="method-source-code" id="newstreams-source">
|
929
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
981
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 253</span>
|
930
982
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">newstreams</span>
|
931
983
|
<span class="ruby-identifier">reply</span>=[]
|
932
984
|
<span class="ruby-identifier">getinfo</span>(<span class="ruby-string">"stream-status"</span>).<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">eachstream</span><span class="ruby-operator">|</span>
|
933
985
|
<span class="ruby-keyword">case</span> <span class="ruby-identifier">eachstream</span>
|
934
986
|
<span class="ruby-keyword">when</span> <span class="ruby-regexp">/\d+ NEW 0/</span>
|
935
987
|
<span class="ruby-comment"># It might be simpler to use this /\d+ NEW/</span>
|
936
|
-
<span class="ruby-identifier">reply</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">eachstream</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp">/\d+/</span>)[<span class="ruby-value">0</span>]
|
988
|
+
<span class="ruby-identifier">reply</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">eachstream</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp">/\d+/</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_i</span>
|
937
989
|
<span class="ruby-keyword">end</span>
|
938
990
|
}
|
939
991
|
<span class="ruby-identifier">reply</span>
|
@@ -971,7 +1023,7 @@ routers that have not been marked as down.</p>
|
|
971
1023
|
|
972
1024
|
|
973
1025
|
<div class="method-source-code" id="setconf-source">
|
974
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
1026
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 429</span>
|
975
1027
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">setconf</span>(<span class="ruby-identifier">confname</span>,<span class="ruby-identifier">value</span>)
|
976
1028
|
<span class="ruby-identifier">sr</span>(<span class="ruby-value">:setconf</span>,<span class="ruby-node">"#{confname}=#{value}"</span>)
|
977
1029
|
<span class="ruby-keyword">end</span></pre>
|
@@ -1006,7 +1058,7 @@ Tor::TController.signal("HUP")</pre>
|
|
1006
1058
|
|
1007
1059
|
|
1008
1060
|
<div class="method-source-code" id="signal-source">
|
1009
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
1061
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 439</span>
|
1010
1062
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">signal</span>(<span class="ruby-identifier">args</span>)
|
1011
1063
|
<span class="ruby-identifier">reply</span>=[]
|
1012
1064
|
<span class="ruby-keyword">case</span> (<span class="ruby-identifier">args</span>)
|
@@ -1055,7 +1107,7 @@ Tor::TController.sr(:signal,"newnym")</pre>
|
|
1055
1107
|
|
1056
1108
|
|
1057
1109
|
<div class="method-source-code" id="sr-source">
|
1058
|
-
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line
|
1110
|
+
<pre><span class="ruby-comment"># File lib/tcontroller.rb, line 462</span>
|
1059
1111
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">sr</span>(<span class="ruby-identifier">command</span>, *<span class="ruby-identifier">args</span>)
|
1060
1112
|
<span class="ruby-identifier">send_command</span>(<span class="ruby-identifier">command</span>, *<span class="ruby-identifier">args</span>)
|
1061
1113
|
<span class="ruby-identifier">reply</span>=[]
|
data/doc/created.rid
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
./ReadME.txt
|
3
|
-
./lib/httpmod.rb Sun, 13 Nov 2011 10:
|
4
|
-
./lib/tor_extend.rb
|
1
|
+
Thu, 22 Dec 2011 02:51:41 +0100
|
2
|
+
./ReadME.txt Thu, 15 Dec 2011 12:48:17 +0100
|
3
|
+
./lib/httpmod.rb Sun, 13 Nov 2011 10:05:48 +0100
|
4
|
+
./lib/tor_extend.rb Thu, 24 Nov 2011 10:41:35 +0100
|
5
5
|
./lib/tstats.rb Tue, 08 Nov 2011 16:39:32 +0100
|
6
|
-
./lib/
|
7
|
-
./lib/
|
6
|
+
./lib/circuits.rb Thu, 22 Dec 2011 02:04:22 +0100
|
7
|
+
./lib/tcontroller.rb Wed, 21 Dec 2011 23:04:42 +0100
|
8
|
+
./lib/constants.rb Thu, 08 Dec 2011 16:06:40 +0100
|
data/doc/index.html
CHANGED
@@ -65,8 +65,12 @@
|
|
65
65
|
|
66
66
|
<li><a href="./Tor/CachedDesc.html">Tor::CachedDesc</a>
|
67
67
|
|
68
|
+
<li><a href="./Tor/Circuit.html">Tor::Circuit</a>
|
69
|
+
|
68
70
|
<li><a href="./Tor/Constants.html">Tor::Constants</a>
|
69
71
|
|
72
|
+
<li><a href="./Tor/LongCircuit.html">Tor::LongCircuit</a>
|
73
|
+
|
70
74
|
<li><a href="./Tor/Router.html">Tor::Router</a>
|
71
75
|
|
72
76
|
<li><a href="./Tor/StatsObj.html">Tor::StatsObj</a>
|
data/doc/js/search_index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var search_data = {"index":{"searchIndex":["tor","bridge","cacheddesc","constants","router","statsobj","tcontroller","attach_stream()","bridges()","cir_status()","closeallcircuits()","closecircuit()","continent_count()","continent_count_uniq()","continent_getfingerprint()","continent_list()","continent_stat()","continent_stat_uniq()","country_count()","country_count_uniq()","country_getfingerprint()","country_getip()","country_list()","country_stat()","country_stat_uniq()","dbconnect()","ds()","extendcir()","extendcir_slowly()","genkml()","get_bridges()","get_countryname()","get_entryguards()","get_geoiprecord()","get_httperrors()","get_latlng()","get_purposeip()","get_uniqid()","getconf()","getinfo()","net_status()","new()","newstreams()","ors()","readall()","setconf()","signal()","sr()","stat()","topcountries()","topcountries_uniq()","readme"],"longSearchIndex":["tor","tor::bridge","tor::cacheddesc","tor::constants","tor::router","tor::statsobj","tor::tcontroller","tor::tcontroller#attach_stream()","tor::tcontroller#bridges()","tor::tcontroller#cir_status()","tor::tcontroller#closeallcircuits()","tor::tcontroller#closecircuit()","tor::statsobj#continent_count()","tor::statsobj#continent_count_uniq()","tor::statsobj#continent_getfingerprint()","tor::statsobj#continent_list()","tor::statsobj#continent_stat()","tor::statsobj#continent_stat_uniq()","tor::statsobj#country_count()","tor::statsobj#country_count_uniq()","tor::statsobj#country_getfingerprint()","tor::statsobj#country_getip()","tor::statsobj#country_list()","tor::statsobj#country_stat()","tor::statsobj#country_stat_uniq()","tor::cacheddesc#dbconnect()","tor::tcontroller#ds()","tor::tcontroller#extendcir()","tor::tcontroller#extendcir_slowly()","tor::statsobj#genkml()","tor::tcontroller#get_bridges()","tor::statsobj#get_countryname()","tor::tcontroller#get_entryguards()","tor::cacheddesc#get_geoiprecord()","tor::tcontroller#get_httperrors()","tor::statsobj#get_latlng()","tor::tcontroller#get_purposeip()","tor::statsobj#get_uniqid()","tor::tcontroller#getconf()","tor::tcontroller#getinfo()","tor::tcontroller#net_status()","tor::cacheddesc::new()","tor::tcontroller#newstreams()","tor::cacheddesc#ors()","tor::cacheddesc#readall()","tor::tcontroller#setconf()","tor::tcontroller#signal()","tor::tcontroller#sr()","tor::cacheddesc#stat()","tor::statsobj#topcountries()","tor::statsobj#topcountries_uniq()",""],"info":[["Tor","","Tor.html","","<p>Tor includes the TController class, which inherits the methods from\nBendiken’s page Tor::Controller class …\n"],["Tor::Bridge","","Tor/Bridge.html","","<p>Tor::Bridge is a class for the active record database holding the\nip-addresses and port for the bridges …\n"],["Tor::CachedDesc","","Tor/CachedDesc.html","","<p>Tor::CachedDesc is a class used to read cached descriptors into a database.\nThe ip address, fingerprint, …\n"],["Tor::Constants","","Tor/Constants.html","","<p>This module contains constants for the Tor module such as a COUNLATLNG\n"],["Tor::Router","","Tor/Router.html","","<p>Tor::Router is a class for the active record database holding the\nip-addresses, platform, fingerprint, …\n"],["Tor::StatsObj","","Tor/StatsObj.html","","<p>This class can be used to obtain a variety of statistics or data from\nTor::Router. The same user have …\n"],["Tor::TController","","Tor/TController.html","","<p>Tor:TController is an extension of the Tor::Controller class, providing\nmore methods. It inherits all …\n"],["attach_stream","Tor::TController","Tor/TController.html#method-i-attach_stream","(stream_no, cir_num ,hop_count)","<p>This attaches streams to circuits. No documentation yet.\n"],["bridges","Tor::TController","Tor/TController.html#method-i-bridges","()","<p>Returns all the brdiges in the database as an array.\n<p>Tor::TController.bridges => [{:ipaddr, :port, …\n"],["cir_status","Tor::TController","Tor/TController.html#method-i-cir_status","()","<p>This returns the circuit-status in an array, or an empty array on failure\n<p><strong>Get the circuit-status from</strong> ...\n"],["closeallcircuits","Tor::TController","Tor/TController.html#method-i-closeallcircuits","()","<p>This attempts to close all open circuits.\n<p><strong>Closing all circuits</strong>\n\n<pre>Tor::TController.closeallcircuits</pre>\n"],["closecircuit","Tor::TController","Tor/TController.html#method-i-closecircuit","(circnum)","<p>This attempts to close a single circuit.\n<p><strong>Closing circuits</strong>\n\n<pre>Tor::TController.closecircuit(15)</pre>\n"],["continent_count","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_count","(code,*platform)","<p>This returns the number of OR IP addresses from the continent with the code\nused as input (and optionally …\n"],["continent_count_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_count_uniq","(code,*platform)","<p>This returns the number of OR IP addresses from the continent with the code\nused as input (and optionally …\n"],["continent_getfingerprint","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_getfingerprint","(continent_filter,*platform)","<p>This retuns an array of all OR fingerprints from Tor::Router using a filter\nof continents and optional …\n"],["continent_list","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_list","(*platform)","<p>This returns a list of all continents that have contributed to the OR IP\naddresses in Tor::Router It …\n"],["continent_stat","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_stat","(allcontinents,*platform)","<p>It takes an array of continent codes as input, and produces a hash with the\ncontinent codes as keys and …\n"],["continent_stat_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_stat_uniq","(allcontinents,*platform)","<p>It takes an array of continent codes as input, and produces a hash with the\ncontinent codes as keys and …\n"],["country_count","Tor::StatsObj","Tor/StatsObj.html#method-i-country_count","(code,*platform)","<p>This returns the number of OR IP addresses from the country with the code\nused as input (and optionally …\n"],["country_count_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-country_count_uniq","(countryfilter,*platform)","<p>This returns the total number of uniq identities found in the database.\n<p><b>Get total number of routers ...\n"],["country_getfingerprint","Tor::StatsObj","Tor/StatsObj.html#method-i-country_getfingerprint","(country_filter,*platform)","<p>This retuns an array of all OR fingerprints from the Tor::Router using a\nfilter of countries and optional …\n"],["country_getip","Tor::StatsObj","Tor/StatsObj.html#method-i-country_getip","(country_filter,*platform)","<p>This retuns an array of all OR IP addresses from the Tor::Router using a\nfilter of countries and optional …\n"],["country_list","Tor::StatsObj","Tor/StatsObj.html#method-i-country_list","(*platform)","<p>This returns a list of all countries that have contributed to the OR IP\naddresses in Tor::Router It can …\n"],["country_stat","Tor::StatsObj","Tor/StatsObj.html#method-i-country_stat","(countrycodes,*platform)","<p>It takes an array of country codes as input, and produces a hash with the\ncountry codes as keys and the …\n"],["country_stat_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-country_stat_uniq","(countrycodes,*platform)","<p>It takes an array of country codes as input, and produces a hash with the\ncountry codes as keys and the …\n"],["dbconnect","Tor::CachedDesc","Tor/CachedDesc.html#method-i-dbconnect","(*dbconfig)","<p>Tor::dbconnect() method connects using the optional database config passed\nas argument. It creates an …\n"],["ds","Tor::TController","Tor/TController.html#method-i-ds","()","<p>Returns the an array of of directory servers from the consensus.\n<p>Tor::TController.ds => [w.x.y.z:port, …\n"],["extendcir","Tor::TController","Tor/TController.html#method-i-extendcir","(circnum,or_list)","<p>This creates/extends a circuit over multiple nodes. A new circuit is\ncreated if cir_num == 0.\n<p><strong>Creating</strong> ...\n"],["extendcir_slowly","Tor::TController","Tor/TController.html#method-i-extendcir_slowly","(orarray)","<p>This builds a circuit to each member of the array argument, skipping any\nnode that fails to connect. …\n"],["genkml","Tor::StatsObj","Tor/StatsObj.html#method-i-genkml","(mapname,*platform)","<p>This method generates a KML using the locations in Tor::Router database. It\ntakes a name for the KML …\n"],["get_bridges","Tor::TController","Tor/TController.html#method-i-get_bridges","(url, cacheddesc, *config)","<p>This gets 3 bridge IP addresses from the Tor bridge website. proxyconfig is\noptional. default proxyconfig …\n"],["get_countryname","Tor::StatsObj","Tor/StatsObj.html#method-i-get_countryname","(ccode)","<p>This returns the country name from the country code.\n<p>@example Get country name from country code\n\n<pre>Tor::StatsObj.get_countryname("FR")</pre>\n"],["get_entryguards","Tor::TController","Tor/TController.html#method-i-get_entryguards","()","<p>This gets enty guards from the control port of tor using the getinfo\n“entry-guards” command …\n"],["get_geoiprecord","Tor::CachedDesc","Tor/CachedDesc.html#method-i-get_geoiprecord","(ipaddr)","<p>This returns the Geoip record from one of the database files used in\nTor::CachedDesc.\n"],["get_httperrors","Tor::TController","Tor/TController.html#method-i-get_httperrors","()","<p>This returns the number of HTTP errors from the\nTor::TController.get_bridges command\n"],["get_latlng","Tor::StatsObj","Tor/StatsObj.html#method-i-get_latlng","(country_code)","<p>This returns the [latitude,longitude] from the country code. Using the\nconstant Tor::Constants::COUNLATLNG …\n"],["get_purposeip","Tor::TController","Tor/TController.html#method-i-get_purposeip","(nodetype)","<p>This gets the IP addresses for ORs based on the characteristics of the OR.\nExample of the properties …\n"],["get_uniqid","Tor::StatsObj","Tor/StatsObj.html#method-i-get_uniqid","(countryfilter,*platform)","<p>This returns the id of uniq identities in the database\n<p>@example Get Uniq id of ORs in the UK\n\n<pre>Tor::Stats.Obj.get_uniqid("GB") ...</pre>\n"],["getconf","Tor::TController","Tor/TController.html#method-i-getconf","(confname)","<p>This gets a configuration from Tor. The arguments of this command might be\ncase sensitive. It returns …\n"],["getinfo","Tor::TController","Tor/TController.html#method-i-getinfo","(*args)","<p>This method sends the “GETINFO” protocol message with the arguments.\n<p><strong>Getting more information</strong> ...\n"],["net_status","Tor::TController","Tor/TController.html#method-i-net_status","()","<p>This returns an array of hash tables with the fingerprints of all onion\nrouters that have not been marked …\n"],["new","Tor::CachedDesc","Tor/CachedDesc.html#method-c-new","(geoip_path)","<p>This initialises the stat attribute of the CachedDesc class that can be\nused to get data from Tor::Router …\n"],["newstreams","Tor::TController","Tor/TController.html#method-i-newstreams","()","<p>This returns all the new streams that have not been assigned to a circuit\n"],["ors","Tor::CachedDesc","Tor/CachedDesc.html#method-i-ors","()","<p>Returns the Router database class. Allows interation with the database as\nan instance of Active::Base …\n"],["readall","Tor::CachedDesc","Tor/CachedDesc.html#method-i-readall","(filename)","<p>Read a file and put all the ralated information into the Tor::Router\ndatabase.\n"],["setconf","Tor::TController","Tor/TController.html#method-i-setconf","(confname,value)","<p>This sets a configuration in Tor to a value.\n<p><strong>Setting Tor config</strong>\n\n<pre>Tor::TController.setconf("__DisablePredictedCircuits",1) ...</pre>\n"],["signal","Tor::TController","Tor/TController.html#method-i-signal","(args)","<p>This method sends “signals” protocol message with the arguments.\n<p><strong>Reload Tor config from file</strong> ...\n"],["sr","Tor::TController","Tor/TController.html#method-i-sr","(command, *args)","<p>This sends commands and returns the protocol response code along with an\narray containing the results …\n"],["stat","Tor::CachedDesc","Tor/CachedDesc.html#method-i-stat","()","<p>This initialises the stat attribute of the CachedDesc class that can be\nused to get data from Tor::Router …\n"],["topcountries","Tor::StatsObj","Tor/StatsObj.html#method-i-topcountries","(num,*platform)","<p>This returns the top n-countries. An optional platform parameter can be\npassed to this and returns an …\n"],["topcountries_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-topcountries_uniq","(num,*platform)","<p>This returns the top n-countries. An optional platform parameter can be\npassed to this and returns an …\n"],["ReadME","","ReadME_txt.html","","<p>Please see the Unlicence disclaimer in Bendiken’s tor-ruby gem.\n<p><strong>Installation instruction </strong>\n<p>Run “gem …\n"]]}}
|
1
|
+
var search_data = {"index":{"searchIndex":["tor","bridge","cacheddesc","circuit","constants","longcircuit","router","statsobj","tcontroller","attach_stream()","attach_streams()","attach_streams()","bridges()","built?()","built?()","cir_status()","circuit()","circuit()","cirnum()","cirnum()","close_apps()","close_apps()","closeallcircuits()","closecir()","closecircuit()","closed?()","continent_count()","continent_count_uniq()","continent_getfingerprint()","continent_list()","continent_stat()","continent_stat_uniq()","controller()","country_count()","country_count_uniq()","country_getfingerprint()","country_getip()","country_list()","country_stat()","country_stat_uniq()","dbconnect()","ds()","extend()","extend()","extendcir()","extendcir_slowly()","genkml()","get_bridges()","get_bridges()","get_countryname()","get_entryguards()","get_geoiprecord()","get_httperrors()","get_latlng()","get_purposeip()","get_uniqid()","getconf()","getinfo()","launch()","launched?()","net_status()","new()","new()","new()","new()","newstreams()","ors()","readall()","setconf()","signal()","sr()","start()","stat()","topcountries()","topcountries_uniq()","readme"],"longSearchIndex":["tor","tor::bridge","tor::cacheddesc","tor::circuit","tor::constants","tor::longcircuit","tor::router","tor::statsobj","tor::tcontroller","tor::tcontroller#attach_stream()","tor::circuit#attach_streams()","tor::longcircuit#attach_streams()","tor::tcontroller#bridges()","tor::circuit#built?()","tor::longcircuit#built?()","tor::tcontroller#cir_status()","tor::circuit#circuit()","tor::longcircuit#circuit()","tor::circuit#cirnum()","tor::longcircuit#cirnum()","tor::circuit#close_apps()","tor::longcircuit#close_apps()","tor::tcontroller#closeallcircuits()","tor::circuit#closecir()","tor::tcontroller#closecircuit()","tor::circuit#closed?()","tor::statsobj#continent_count()","tor::statsobj#continent_count_uniq()","tor::statsobj#continent_getfingerprint()","tor::statsobj#continent_list()","tor::statsobj#continent_stat()","tor::statsobj#continent_stat_uniq()","tor::circuit#controller()","tor::statsobj#country_count()","tor::statsobj#country_count_uniq()","tor::statsobj#country_getfingerprint()","tor::statsobj#country_getip()","tor::statsobj#country_list()","tor::statsobj#country_stat()","tor::statsobj#country_stat_uniq()","tor::cacheddesc#dbconnect()","tor::tcontroller#ds()","tor::circuit#extend()","tor::longcircuit#extend()","tor::tcontroller#extendcir()","tor::tcontroller#extendcir_slowly()","tor::statsobj#genkml()","tor::circuit#get_bridges()","tor::tcontroller#get_bridges()","tor::statsobj#get_countryname()","tor::tcontroller#get_entryguards()","tor::cacheddesc#get_geoiprecord()","tor::tcontroller#get_httperrors()","tor::statsobj#get_latlng()","tor::tcontroller#get_purposeip()","tor::statsobj#get_uniqid()","tor::tcontroller#getconf()","tor::tcontroller#getinfo()","tor::circuit#launch()","tor::circuit#launched?()","tor::tcontroller#net_status()","tor::cacheddesc::new()","tor::circuit::new()","tor::longcircuit::new()","tor::tcontroller::new()","tor::tcontroller#newstreams()","tor::cacheddesc#ors()","tor::cacheddesc#readall()","tor::tcontroller#setconf()","tor::tcontroller#signal()","tor::tcontroller#sr()","tor::circuit#start()","tor::cacheddesc#stat()","tor::statsobj#topcountries()","tor::statsobj#topcountries_uniq()",""],"info":[["Tor","","Tor.html","","<p>Tor includes the TController class, which inherits the methods from\nBendiken’s page Tor::Controller class …\n"],["Tor::Bridge","","Tor/Bridge.html","","<p>Tor::Bridge is a class for the active record database holding the\nip-addresses and port for the bridges …\n"],["Tor::CachedDesc","","Tor/CachedDesc.html","","<p>Tor::CachedDesc is a class used to read cached descriptors into a database.\nThe ip address, fingerprint, …\n"],["Tor::Circuit","","Tor/Circuit.html","","<p>This is a single (sub-)circuit object over exactly 3 nodes.Suitable nodes\nmust be chosesn to allow the …\n"],["Tor::Constants","","Tor/Constants.html","","<p>This module contains constants for the Tor module such as a COUNLATLNG\n"],["Tor::LongCircuit","","Tor/LongCircuit.html","","<p>This creates a Long circuit comprising of multiple sub-circuits. Methods\ninclude LongCircuit.built?, …\n"],["Tor::Router","","Tor/Router.html","","<p>Tor::Router is a class for the active record database holding the\nip-addresses, platform, fingerprint, …\n"],["Tor::StatsObj","","Tor/StatsObj.html","","<p>This class can be used to obtain a variety of statistics or data from\nTor::Router. The same user have …\n"],["Tor::TController","","Tor/TController.html","","<p>Tor:TController is an extension of the Tor::Controller class, providing\nmore methods. It inherits all …\n"],["attach_stream","Tor::TController","Tor/TController.html#method-i-attach_stream","(stream_no, cir_num ,*hop_count)","<p>This attaches streams to circuits. No documentation yet.\n"],["attach_streams","Tor::Circuit","Tor/Circuit.html#method-i-attach_streams","()","<p>This tries to attach all streams to the circuit.\n"],["attach_streams","Tor::LongCircuit","Tor/LongCircuit.html#method-i-attach_streams","()","<p>This tries to attach all streams to to a single pre-established circuit.\n"],["bridges","Tor::TController","Tor/TController.html#method-i-bridges","()","<p>Returns all the brdiges in the database as an array.\n<p>Tor::TController.bridges => [{:ipaddr, :port, …\n"],["built?","Tor::Circuit","Tor/Circuit.html#method-i-built-3F","()","<p>This methods checks if the circuit has been built. It only reflects a\nsingle segment of the circuit\n"],["built?","Tor::LongCircuit","Tor/LongCircuit.html#method-i-built-3F","()","<p>Checks if the subcircuits have been built.\n"],["cir_status","Tor::TController","Tor/TController.html#method-i-cir_status","()","<p>This returns the circuit-status in an array, or an empty array on failure\n<p><strong>Get the circuit-status from</strong> ...\n"],["circuit","Tor::Circuit","Tor/Circuit.html#method-i-circuit","()","<p>Returns the nodes that make up the circuit.\n"],["circuit","Tor::LongCircuit","Tor/LongCircuit.html#method-i-circuit","()","<p>Returns the array of Tor::Circuit instances that make up the LongCircuit\ninstance.\n"],["cirnum","Tor::Circuit","Tor/Circuit.html#method-i-cirnum","()","<p>Returns the circuit number. Returns 0 if it has not been attached\n"],["cirnum","Tor::LongCircuit","Tor/LongCircuit.html#method-i-cirnum","()",""],["close_apps","Tor::Circuit","Tor/Circuit.html#method-i-close_apps","()","<p>Closes the Tor and Polipo launched by the instance of this class, and\nremoves the tmp directory\n"],["close_apps","Tor::LongCircuit","Tor/LongCircuit.html#method-i-close_apps","()","<p>This closes all the sub-circuits.\n"],["closeallcircuits","Tor::TController","Tor/TController.html#method-i-closeallcircuits","()","<p>This attempts to close all open circuits.\n<p><strong>Closing all circuits</strong>\n\n<pre>Tor::TController.closeallcircuits</pre>\n"],["closecir","Tor::Circuit","Tor/Circuit.html#method-i-closecir","()","<p>Closes the circuit\n"],["closecircuit","Tor::TController","Tor/TController.html#method-i-closecircuit","(circnum)","<p>This attempts to close a single circuit.\n<p><strong>Closing circuits</strong>\n\n<pre>Tor::TController.closecircuit(15)</pre>\n"],["closed?","Tor::Circuit","Tor/Circuit.html#method-i-closed-3F","()","<p>Checks if the application instances for Tor and polipo have been closed\n"],["continent_count","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_count","(code,*platform)","<p>This returns the number of OR IP addresses from the continent with the code\nused as input (and optionally …\n"],["continent_count_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_count_uniq","(code,*platform)","<p>This returns the number of OR IP addresses from the continent with the code\nused as input (and optionally …\n"],["continent_getfingerprint","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_getfingerprint","(continent_filter,*platform)","<p>This retuns an array of all OR fingerprints from Tor::Router using a filter\nof continents and optional …\n"],["continent_list","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_list","(*platform)","<p>This returns a list of all continents that have contributed to the OR IP\naddresses in Tor::Router It …\n"],["continent_stat","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_stat","(allcontinents,*platform)","<p>It takes an array of continent codes as input, and produces a hash with the\ncontinent codes as keys and …\n"],["continent_stat_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-continent_stat_uniq","(allcontinents,*platform)","<p>It takes an array of continent codes as input, and produces a hash with the\ncontinent codes as keys and …\n"],["controller","Tor::Circuit","Tor/Circuit.html#method-i-controller","()","<p>Returns the Tor:Controller used for the circuit.\n"],["country_count","Tor::StatsObj","Tor/StatsObj.html#method-i-country_count","(code,*platform)","<p>This returns the number of OR IP addresses from the country with the code\nused as input (and optionally …\n"],["country_count_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-country_count_uniq","(countryfilter,*platform)","<p>This returns the total number of uniq identities found in the database.\n<p><b>Get total number of routers ...\n"],["country_getfingerprint","Tor::StatsObj","Tor/StatsObj.html#method-i-country_getfingerprint","(country_filter,*platform)","<p>This retuns an array of all OR fingerprints from the Tor::Router using a\nfilter of countries and optional …\n"],["country_getip","Tor::StatsObj","Tor/StatsObj.html#method-i-country_getip","(country_filter,*platform)","<p>This retuns an array of all OR IP addresses from the Tor::Router using a\nfilter of countries and optional …\n"],["country_list","Tor::StatsObj","Tor/StatsObj.html#method-i-country_list","(*platform)","<p>This returns a list of all countries that have contributed to the OR IP\naddresses in Tor::Router It can …\n"],["country_stat","Tor::StatsObj","Tor/StatsObj.html#method-i-country_stat","(countrycodes,*platform)","<p>It takes an array of country codes as input, and produces a hash with the\ncountry codes as keys and the …\n"],["country_stat_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-country_stat_uniq","(countrycodes,*platform)","<p>It takes an array of country codes as input, and produces a hash with the\ncountry codes as keys and the …\n"],["dbconnect","Tor::CachedDesc","Tor/CachedDesc.html#method-i-dbconnect","(*dbconfig)","<p>Tor::dbconnect() method connects using the optional database config passed\nas argument. It creates an …\n"],["ds","Tor::TController","Tor/TController.html#method-i-ds","()","<p>Returns the an array of of directory servers from the consensus.\n<p>Tor::TController.ds => [w.x.y.z:port, …\n"],["extend","Tor::Circuit","Tor/Circuit.html#method-i-extend","()","<p>This creates / builds the actual circuit using @circuitarray.\n"],["extend","Tor::LongCircuit","Tor/LongCircuit.html#method-i-extend","(*startcir)","<p>Extend circuits from startcir position in the circuit array. This is used\ninternally by Tor.attach_streams …\n"],["extendcir","Tor::TController","Tor/TController.html#method-i-extendcir","(circnum,or_list)","<p>This creates/extends a circuit over multiple nodes. A new circuit is\ncreated if cir_num == 0.\n<p><strong>Creating</strong> ...\n"],["extendcir_slowly","Tor::TController","Tor/TController.html#method-i-extendcir_slowly","(orarray)","<p>This builds a circuit to each member of the array argument, skipping any\nnode that fails to connect. …\n"],["genkml","Tor::StatsObj","Tor/StatsObj.html#method-i-genkml","(mapname,*platform)","<p>This method generates a KML using the locations in Tor::Router database. It\ntakes a name for the KML …\n"],["get_bridges","Tor::Circuit","Tor/Circuit.html#method-i-get_bridges","(cacheddesc, *config)","<p>This gets 3 bridge IP addresses from the Tor bridge website. proxyconfig is\noptional. default proxyconfig …\n"],["get_bridges","Tor::TController","Tor/TController.html#method-i-get_bridges","(cacheddesc, *config)","<p>This gets 3 bridge IP addresses from the Tor bridge website. proxyconfig is\noptional. default proxyconfig …\n"],["get_countryname","Tor::StatsObj","Tor/StatsObj.html#method-i-get_countryname","(ccode)","<p>This returns the country name from the country code.\n<p>@example Get country name from country code\n\n<pre>Tor::StatsObj.get_countryname("FR")</pre>\n"],["get_entryguards","Tor::TController","Tor/TController.html#method-i-get_entryguards","()","<p>This gets enty guards from the control port of tor using the getinfo\n“entry-guards” command …\n"],["get_geoiprecord","Tor::CachedDesc","Tor/CachedDesc.html#method-i-get_geoiprecord","(ipaddr)","<p>This returns the Geoip record from one of the database files used in\nTor::CachedDesc.\n"],["get_httperrors","Tor::TController","Tor/TController.html#method-i-get_httperrors","()","<p>This returns the number of HTTP errors from the\nTor::TController.get_bridges command\n"],["get_latlng","Tor::StatsObj","Tor/StatsObj.html#method-i-get_latlng","(country_code)","<p>This returns the [latitude,longitude] from the country code. Using the\nconstant Tor::Constants::COUNLATLNG …\n"],["get_purposeip","Tor::TController","Tor/TController.html#method-i-get_purposeip","(nodetype)","<p>This gets the IP addresses for ORs based on the characteristics of the OR.\nExample of the properties …\n"],["get_uniqid","Tor::StatsObj","Tor/StatsObj.html#method-i-get_uniqid","(countryfilter,*platform)","<p>This returns the id of uniq identities in the database\n<p>@example Get Uniq id of ORs in the UK\n\n<pre>Tor::Stats.Obj.get_uniqid("GB") ...</pre>\n"],["getconf","Tor::TController","Tor/TController.html#method-i-getconf","(confname)","<p>This gets a configuration from Tor. The arguments of this command might be\ncase sensitive. It returns …\n"],["getinfo","Tor::TController","Tor/TController.html#method-i-getinfo","(*args)","<p>This method sends the “GETINFO” protocol message with the arguments.\n<p><strong>Getting more information</strong> ...\n"],["launch","Tor::Circuit","Tor/Circuit.html#method-i-launch","()","<p>Run this after initializing a Tor::Circuit instaance. This writes the\nfollowing Tor configuration options …\n"],["launched?","Tor::Circuit","Tor/Circuit.html#method-i-launched-3F","()","<p>Checks if the launched method has been called\n"],["net_status","Tor::TController","Tor/TController.html#method-i-net_status","()","<p>This returns an array of hash tables with the fingerprints of all onion\nrouters that have not been marked …\n"],["new","Tor::CachedDesc","Tor/CachedDesc.html#method-c-new","(geoip_path)","<p>This initialises the stat attribute of the CachedDesc class that can be\nused to get data from Tor::Router …\n"],["new","Tor::Circuit","Tor/Circuit.html#method-c-new","(ctrller_config, circuitarray, proxyconfig)","<p>Initialises a Tor::Circuit instance variable with attibutes including the\n@built, @cirnum and @torcontroller …\n"],["new","Tor::LongCircuit","Tor/LongCircuit.html#method-c-new","( tcontrolarray=[], circuitarray=[], proxyconfig )","<p>Creates an instance of Tor::LongCircuit and initialises the attributes of\nthe instance including the …\n"],["new","Tor::TController","Tor/TController.html#method-c-new","(options = {}, &block)","<p>@param [Hash{Symbol => Object}] options @option options [String, #to_s]\n:host (“127.0.0.1 …\n"],["newstreams","Tor::TController","Tor/TController.html#method-i-newstreams","()","<p>This returns all the new streams that have not been assigned to a circuit\n"],["ors","Tor::CachedDesc","Tor/CachedDesc.html#method-i-ors","()","<p>Returns the Router database class. Allows interation with the database as\nan instance of Active::Base …\n"],["readall","Tor::CachedDesc","Tor/CachedDesc.html#method-i-readall","(filename)","<p>Read a file and put all the ralated information into the Tor::Router\ndatabase.\n"],["setconf","Tor::TController","Tor/TController.html#method-i-setconf","(confname,value)","<p>This sets a configuration in Tor to a value.\n<p><strong>Setting Tor config</strong>\n\n<pre>Tor::TController.setconf("__DisablePredictedCircuits",1) ...</pre>\n"],["signal","Tor::TController","Tor/TController.html#method-i-signal","(args)","<p>This method sends “signals” protocol message with the arguments.\n<p><strong>Reload Tor config from file</strong> ...\n"],["sr","Tor::TController","Tor/TController.html#method-i-sr","(command, *args)","<p>This sends commands and returns the protocol response code along with an\narray containing the results …\n"],["start","Tor::Circuit","Tor/Circuit.html#method-i-start","()","<p>This attaches all streams on this controller to a prebuilt circuit that has\nbeen\n"],["stat","Tor::CachedDesc","Tor/CachedDesc.html#method-i-stat","()","<p>This initialises the stat attribute of the CachedDesc class that can be\nused to get data from Tor::Router …\n"],["topcountries","Tor::StatsObj","Tor/StatsObj.html#method-i-topcountries","(num,*platform)","<p>This returns the top n-countries. An optional platform parameter can be\npassed to this and returns an …\n"],["topcountries_uniq","Tor::StatsObj","Tor/StatsObj.html#method-i-topcountries_uniq","(num,*platform)","<p>This returns the top n-countries. An optional platform parameter can be\npassed to this and returns an …\n"],["ReadME","","ReadME_txt.html","","<p><strong>tor_extend.</strong>\n<p>Technical details of the tor attack and slides from the conferences can be\nfound at the CVO …\n"]]}}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>ReadME</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body class="file">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="project-metadata">
|
47
|
+
<nav id="fileindex-section" class="section project-section">
|
48
|
+
<h3 class="section-header">Pages</h3>
|
49
|
+
|
50
|
+
<ul>
|
51
|
+
|
52
|
+
<li class="file"><a href="../ReadME_txt.html">ReadME</a>
|
53
|
+
|
54
|
+
</ul>
|
55
|
+
</nav>
|
56
|
+
|
57
|
+
<nav id="classindex-section" class="section project-section">
|
58
|
+
<h3 class="section-header">Class and Module Index</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="../Tor.html">Tor</a>
|
63
|
+
|
64
|
+
<li><a href="../Tor/Bridge.html">Tor::Bridge</a>
|
65
|
+
|
66
|
+
<li><a href="../Tor/CachedDesc.html">Tor::CachedDesc</a>
|
67
|
+
|
68
|
+
<li><a href="../Tor/Circuit.html">Tor::Circuit</a>
|
69
|
+
|
70
|
+
<li><a href="../Tor/Constants.html">Tor::Constants</a>
|
71
|
+
|
72
|
+
<li><a href="../Tor/LongCircuit.html">Tor::LongCircuit</a>
|
73
|
+
|
74
|
+
<li><a href="../Tor/Router.html">Tor::Router</a>
|
75
|
+
|
76
|
+
<li><a href="../Tor/StatsObj.html">Tor::StatsObj</a>
|
77
|
+
|
78
|
+
<li><a href="../Tor/TController.html">Tor::TController</a>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</nav>
|
85
|
+
|
86
|
+
<div id="documentation" class="description">
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<footer id="validator-badges">
|
93
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
94
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.11.
|
95
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
96
|
+
</footer>
|
97
|
+
|