Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/proxifier/proxies/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def do_proxify(socket, host, port)
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 << "User-Agent: #{user_agent}\r\n" if user_agent
socket << "\r\n"

buffer = Net::BufferedIO.new(socket)
Expand Down
2 changes: 1 addition & 1 deletion lib/proxifier/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def query_options
@query_options ||= query ? Hash[query.split("&").map { |q| q.split("=") }] : {}
end

%w(no_proxy).each do |option|
%w(no_proxy user_agent).each do |option|
class_eval "def #{option}; options[:#{option}] end"
end

Expand Down