Skip to content

Commit

Permalink
feat: add dual-stack support for HTTP client with configurable timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
PlusOne committed Feb 14, 2025
1 parent f00507d commit 4b5ce3b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,17 @@ func createAndMountISO(size, mountpoint, charset string) error {
return nil
}

var dialer = &net.Dialer{
DualStack: true,
Timeout: 5 * time.Second,
}

var dualStackClient = &http.Client{
Transport: &http.Transport{
DialContext: dialer.DialContext,
},
}

func main() {
setDefaults()

Expand Down

0 comments on commit 4b5ce3b

Please sign in to comment.