Skip to content

Commit c8bfc3c

Browse files
Add HTTPS Proxy support
net-http version 0.5.0 finally introduced TLS proxy support: ruby/net-http#55 https://github.com/ruby/net-http/releases/tag/v0.5.0
1 parent 046f0cc commit c8bfc3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/faraday/adapter/net_http.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def net_http_connection(env)
5353
if proxy
5454
Net::HTTP.new(env[:url].hostname, port,
5555
proxy[:uri].hostname, proxy[:uri].port,
56-
proxy[:user], proxy[:password])
56+
proxy[:user], proxy[:password],
57+
proxy[:uri].scheme == 'https')
5758
else
5859
Net::HTTP.new(env[:url].hostname, port, nil)
5960
end

0 commit comments

Comments
 (0)