Class: Tornados::NodesFetcher

Inherits:
Service
  • Object
show all
Defined in:
lib/tornados/nodes_fetcher.rb

Overview

Service for download exit tor nodes IP list. Result is array of arrays:

[“ip addres 1”], [“ip addres 2”], … [“ip addres N”]

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Service

call

Constructor Details

#initialize(uri = nil) ⇒ NodesFetcher

Returns a new instance of NodesFetcher.



17
18
19
20
# File 'lib/tornados/nodes_fetcher.rb', line 17

def initialize(uri = nil)
  @uri = uri || URI(TOR_NODES_LIST_URI)
  @path = TOR_NODES_LIST_PATH
end

Class Method Details

.default_urlObject



22
23
24
# File 'lib/tornados/nodes_fetcher.rb', line 22

def self.default_url
  [TOR_NODES_LIST_URI, TOR_NODES_LIST_PATH].join("/")
end