Skip to content

Commit

Permalink
support proxy setting from env vars
Browse files Browse the repository at this point in the history
Support HTTP_PROXY, HTTPS_PROXY or NO_PROXY being set as environment variables.

e.g., `export HTTPS_PROXY=http://127.0.0.1:38080`
  • Loading branch information
kevdowney authored Nov 26, 2024
1 parent a83f96e commit c48954c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/client/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func (c *Cassowary) runLoadTest(outPutChan chan<- durationMetrics, workerChan ch
}

request = request.WithContext(httptrace.WithClientTrace(context.Background(), trace))
c.Client.Transport.(*http.Transport).Proxy = http.ProxyFromEnvironment
resp, err := c.Client.Do(request)
if err != nil {
log.Fatalf("%v", err)
Expand Down

0 comments on commit c48954c

Please sign in to comment.