diff --git a/lib/proxifier/proxies/http.rb b/lib/proxifier/proxies/http.rb index da1cbd7..2305db9 100644 --- a/lib/proxifier/proxies/http.rb +++ b/lib/proxifier/proxies/http.rb @@ -8,7 +8,7 @@ module Proxifier socket << "CONNECT #{host}:#{port} HTTP/1.1\r\n" socket << "Host: #{host}:#{port}\r\n" - socket << "Proxy-Authorization: Basic #{["#{user}:#{password}"].pack("m").chomp}\r\n" if user + socket << "Proxy-Authorization: Basic #{Base64.strict_encode64("#{user}:#{password}").chomp}\r\n" if user socket << "User-Agent: #{user_agent}\r\n" if user_agent socket << "\r\n"