Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GIT
PATH
remote: .
specs:
stealth-bandwidth (2.0.0)
stealth-bandwidth (2.0.1)
http (~> 4.1)
oj (~> 3.11)
stealth (>= 3.0.0.alpha1)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.0.1
8 changes: 8 additions & 0 deletions lib/stealth/services/bandwidth/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ def initialize(reply:, **args)
.timeout(connect: 15, read: 30)
.basic_auth(user: username, pass: password)
.headers('Content-Type' => 'application/json; charset=utf-8')
# Set up proxy if one is configured
if proxy = URI(@endpoint).find_proxy
if proxy.user || proxy.password
@http_client = @http_client.via(proxy.host, proxy.port, proxy.user, proxy.password)
else
@http_client = @http_client.via(proxy.host, proxy.port)
end
end
end

def transmit
Expand Down