module HTTPX::Plugins::Proxy

  1. lib/httpx/plugins/proxy.rb
  2. lib/httpx/plugins/proxy/http.rb
  3. lib/httpx/plugins/proxy/socks4.rb
  4. lib/httpx/plugins/proxy/socks5.rb
  5. lib/httpx/plugins/proxy/ssh.rb
  6. show all

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

  • HTTP proxies

  • HTTPS proxies

  • Socks4/4a proxies

  • Socks5 proxies

gitlab.com/honeyryderchuck/httpx/wikis/Proxy

Methods

Public Class

  1. configure
  2. extra_options

Constants

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

Public Class methods

configure (klass)
[show source]
   # File lib/httpx/plugins/proxy.rb
62 def configure(klass)
63   klass.plugin(:"proxy/http")
64   klass.plugin(:"proxy/socks4")
65   klass.plugin(:"proxy/socks5")
66 end
extra_options (options)
[show source]
   # File lib/httpx/plugins/proxy.rb
68 def extra_options(options)
69   Class.new(options.class) do
70     def_option(:proxy) do |pr|
71       if pr.is_a?(Parameters)
72         pr
73       else
74         Hash[pr]
75       end
76     end
77   end.new(options)
78 end