Method: HTTPX::Plugins::Proxy::Socks5::Packet.negotiate

Defined in:
lib/httpx/plugins/proxy/socks5.rb

.negotiate(parameters) ⇒ Object



163
164
165
166
167
168
169
# File 'lib/httpx/plugins/proxy/socks5.rb', line 163

def negotiate(parameters)
  methods = [NOAUTH]
  methods << PASSWD if parameters.can_authenticate?
  methods.unshift(methods.size)
  methods.unshift(VERSION)
  methods.pack("C*")
end