Module: HTTPX::Plugins::Proxy::Socks5::Packet
- Defined in:
- lib/httpx/plugins/proxy/socks5.rb,
sig/plugins/proxy/socks5.rbs
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.authenticate(parameters) ⇒ Object
171 172 173 |
# File 'lib/httpx/plugins/proxy/socks5.rb', line 171 def authenticate(parameters) parameters.authenticate end |
.connect(uri) ⇒ Object
175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/httpx/plugins/proxy/socks5.rb', line 175 def connect(uri) packet = [VERSION, CONNECT, 0].pack("C*") begin ip = IPAddr.new(uri.host) ipcode = ip.ipv6? ? IPV6 : IPV4 packet << [ipcode].pack("C") << ip.hton rescue IPAddr::InvalidAddressError packet << [DOMAIN, uri.host.bytesize, uri.host].pack("CCA*") end packet << [uri.port].pack("n") packet end |
Instance Method Details
#self?.authenticate ⇒ String
43 |
# File 'sig/plugins/proxy/socks5.rbs', line 43
def self?.authenticate: (Parameters parameters) -> String
|
#self?.connect ⇒ String
44 |
# File 'sig/plugins/proxy/socks5.rbs', line 44
def self?.connect: (uri uri) -> String
|
#self?.negotiate ⇒ String
42 |
# File 'sig/plugins/proxy/socks5.rbs', line 42
def self?.negotiate: (Parameters parameters) -> String
|