This was lost in #7217 a while back. --------- Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
+14
-7
@@ -71,9 +71,13 @@ var (
|
||||
|
||||
// httpClient is the HTTP client we use for outbound requests. It has a
|
||||
// timeout and may get further options set during initialization.
|
||||
var httpClient = &http.Client{
|
||||
Timeout: 30 * time.Second,
|
||||
}
|
||||
var (
|
||||
httpTransport = &http.Transport{}
|
||||
httpClient = &http.Client{
|
||||
Timeout: 30 * time.Second,
|
||||
Transport: httpTransport,
|
||||
}
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.SetFlags(log.Lshortfile | log.LstdFlags)
|
||||
@@ -132,9 +136,7 @@ func main() {
|
||||
// also come from that address.
|
||||
laddr.Port = 0
|
||||
boundDialer := &net.Dialer{LocalAddr: laddr}
|
||||
httpClient.Transport = &http.Transport{
|
||||
DialContext: boundDialer.DialContext,
|
||||
}
|
||||
httpTransport.DialContext = boundDialer.DialContext
|
||||
}
|
||||
|
||||
log.Println(longVer)
|
||||
@@ -163,6 +165,11 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
// Outgoing HTTPS requests may use our certificate for authentication
|
||||
httpTransport.TLSClientConfig = &tls.Config{
|
||||
Certificates: []tls.Certificate{cert},
|
||||
}
|
||||
|
||||
tlsCfg := &tls.Config{
|
||||
Certificates: []tls.Certificate{cert},
|
||||
NextProtos: []string{protocol.ProtocolName},
|
||||
@@ -277,7 +284,7 @@ func main() {
|
||||
for _, pool := range pools {
|
||||
pool = strings.TrimSpace(pool)
|
||||
if len(pool) > 0 {
|
||||
go poolHandler(pool, uri, mapping, cert)
|
||||
go poolHandler(pool, uri, mapping)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user