class WebSocket::Driver::Proxy
def initialize(client, origin, options)
def initialize(client, origin, options) super() @client = client @http = HTTP::Response.new @socket = client.instance_variable_get(:@socket) @origin = URI.parse(@socket.url) @url = URI.parse(origin) @options = options @state = 0 @headers = Headers.new @headers['Host'] = Driver.host_header(@origin) @headers['Connection'] = 'keep-alive' @headers['Proxy-Connection'] = 'keep-alive' if @url.user auth = Base64.strict_encode64([@url.user, @url.password] * ':') @headers['Proxy-Authorization'] = 'Basic ' + auth end end