mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-06 00:02:08 -04:00
made http and socks sub-plugins from proxy
This commit is contained in:
parent
c7cd490b73
commit
65565c20c9
@ -5,11 +5,6 @@ require "forwardable"
|
||||
module HTTPX
|
||||
module Plugins
|
||||
module Proxy
|
||||
def self.configure(*)
|
||||
require "httpx/plugins/proxy/http"
|
||||
require "httpx/plugins/proxy/socks"
|
||||
end
|
||||
|
||||
class Parameters
|
||||
extend Registry
|
||||
|
||||
@ -72,6 +67,11 @@ module HTTPX
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.configure(klass, *)
|
||||
klass.plugin(:"proxy/http")
|
||||
klass.plugin(:"proxy/socks")
|
||||
end
|
||||
end
|
||||
register_plugin :proxy, Proxy
|
||||
end
|
||||
|
@ -116,5 +116,6 @@ module HTTPX
|
||||
Parameters.register("http", HTTPProxyChannel)
|
||||
end
|
||||
end
|
||||
register_plugin :"proxy/http", Proxy::HTTP
|
||||
end
|
||||
end
|
||||
|
@ -109,6 +109,7 @@ module HTTPX
|
||||
end
|
||||
end
|
||||
end
|
||||
register_plugin :"proxy/socks", Proxy::Socks
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user