Skip to content

Commit

Permalink
Merge pull request #675 from r00t0v3rr1d3/r00t0v3rr1d3-fix-timeout
Browse files Browse the repository at this point in the history
Reduce http idle conn timeout
  • Loading branch information
rkervella authored May 11, 2022
2 parents dc18da5 + 11fb6a5 commit 802ad9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions implant/sliver/transports/httpclient/gohttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"net/http"
"net/url"
"sync"
"time"

// {{if .Config.Debug}}
"log"
Expand All @@ -37,12 +38,14 @@ func GoHTTPDriver(origin string, secure bool, opts *HTTPOptions) (HTTPDriver, er
var transport *http.Transport
if !secure {
transport = &http.Transport{
IdleConnTimeout: time.Millisecond,
Dial: proxy.Direct.Dial,
TLSHandshakeTimeout: opts.TlsTimeout,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // We don't care about the HTTP(S) layer certs
}
} else {
transport = &http.Transport{
IdleConnTimeout: time.Millisecond,
Dial: (&net.Dialer{
Timeout: opts.NetTimeout,
}).Dial,
Expand Down

0 comments on commit 802ad9d

Please sign in to comment.