Allow proxy with authentication

This commit is contained in:
Alex Ling 2020-12-21 12:26:50 +00:00
parent aa5e999ed4
commit df4deb1415

View File

@ -35,7 +35,8 @@ private def env_to_proxy(key : String) : HTTP::Proxy::Client?
begin
uri = URI.parse val
HTTP::Proxy::Client.new uri.hostname.not_nil!, uri.port.not_nil!
HTTP::Proxy::Client.new uri.hostname.not_nil!, uri.port.not_nil!,
username: uri.user, password: uri.password
rescue
nil
end