module Tor::Addresses
Constants
- EXIT_ADDRESSES_URL
- VERSION
Public Class Methods
list()
click to toggle source
# File lib/tor/addresses.rb, line 9 def self.list body = Faraday.new(url: EXIT_ADDRESSES_URL).get.body records = body.split("\n").each.map do |line| Tor::Addresses::Record.new(line) if line.start_with?('ExitAddress') end.compact records end