Module: HTTPX::Plugins::Proxy

Defined in:
lib/httpx/plugins/proxy.rb,
lib/httpx/plugins/proxy/ssh.rb,
lib/httpx/plugins/proxy/http.rb,
lib/httpx/plugins/proxy/socks4.rb,
lib/httpx/plugins/proxy/socks5.rb

Overview

This plugin adds support for proxies. It ships with support for:

  • HTTP proxies

  • HTTPS proxies

  • Socks4/4a proxies

  • Socks5 proxies

gitlab.com/os85/httpx/wikis/Proxy

Defined Under Namespace

Modules: ConnectionMethods, HTTP, InstanceMethods, OptionsMethods, ProxyRetries, SSH, Socks4, Socks5 Classes: Parameters, ProxyConnectionError

Constant Summary collapse

PROXY_ERRORS =
[TimeoutError, IOError, SystemCallError, Error].freeze

Class Method Summary collapse

Class Method Details

.configure(klass) ⇒ Object



23
24
25
26
27
# File 'lib/httpx/plugins/proxy.rb', line 23

def configure(klass)
  klass.plugin(:"proxy/http")
  klass.plugin(:"proxy/socks4")
  klass.plugin(:"proxy/socks5")
end

.extra_options(options) ⇒ Object



29
30
31
# File 'lib/httpx/plugins/proxy.rb', line 29

def extra_options(options)
  options.merge(supported_proxy_protocols: [])
end

.subpluginsObject



33
34
35
36
37
# File 'lib/httpx/plugins/proxy.rb', line 33

def subplugins
  {
    retries: ProxyRetries,
  }
end