PR feedback

This commit is contained in:
Quentin McGaw
2026-06-11 01:17:55 +00:00
parent d28744e06d
commit 9af6aaff27
6 changed files with 5 additions and 2 deletions
+2
View File
@@ -62,6 +62,8 @@ func (c *Client) OpenHTTPSByHostname(ctx context.Context, hostname string) (
portUint, err := strconv.ParseUint(portStr, 10, 16)
if err != nil {
return nil, nil, fmt.Errorf("parsing port: %w", err)
} else if portUint == 0 {
return nil, nil, errors.New("destination port cannot be 0")
}
port := uint16(portUint)
+2
View File
@@ -1,3 +1,5 @@
//go:build integration
package restrictednet
func ptrTo[T any](value T) *T {
-1
View File
@@ -73,7 +73,6 @@ func newHTTPSClient(destinationTLSName string, dial dialFunc) *http.Client {
MaxIdleConns: 1,
MaxIdleConnsPerHost: 1,
MaxConnsPerHost: 1,
IdleConnTimeout: time.Second,
TLSClientConfig: &tls.Config{
MinVersion: tls.VersionTLS12,
ServerName: destinationTLSName,