Module: Rex::Socket::Proxies

Defined in:
lib/rex/socket/proxies.rb

Defined Under Namespace

Modules: ProxyType

Class Method Summary collapse

Class Method Details

.parse(value) ⇒ Array

Returns The array of proxies, i.e. ‘host’, ‘port’]].

Parameters:

  • value (String, nil)

    A proxy chain of format [...]

Returns:

  • (Array)

    The array of proxies, i.e. 'host', 'port']]



15
16
17
# File 'lib/rex/socket/proxies.rb', line 15

def self.parse(value)
  value.to_s.strip.split(',').map { |a| a.strip }.map { |a| a.split(':').map { |b| b.strip } }
end

.supported_typesObject



19
20
21
# File 'lib/rex/socket/proxies.rb', line 19

def self.supported_types
  ProxyType.constants.map { |c| ProxyType.const_get(c) }
end