mirror of
https://github.com/qdm12/gluetun.git
synced 2026-06-25 21:37:31 +02:00
PR feedback
This commit is contained in:
@@ -65,7 +65,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run integration tests in test container
|
- name: Run integration tests in test container
|
||||||
run: |
|
run: |
|
||||||
docker run --rm --entrypoint "go test -tags=integration ./internal/restrictednet" test-container
|
docker run --rm --entrypoint go test-container test -tags=integration ./internal/restrictednet
|
||||||
|
|
||||||
- name: Verify dev cross platform compatibility
|
- name: Verify dev cross platform compatibility
|
||||||
run: docker build --target xcompile .
|
run: docker build --target xcompile .
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ func (c *Client) OpenHTTPSByHostname(ctx context.Context, hostname string) (
|
|||||||
portUint, err := strconv.ParseUint(portStr, 10, 16)
|
portUint, err := strconv.ParseUint(portStr, 10, 16)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, fmt.Errorf("parsing port: %w", err)
|
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)
|
port := uint16(portUint)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
//go:build integration
|
||||||
|
|
||||||
package restrictednet
|
package restrictednet
|
||||||
|
|
||||||
func ptrTo[T any](value T) *T {
|
func ptrTo[T any](value T) *T {
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ func newHTTPSClient(destinationTLSName string, dial dialFunc) *http.Client {
|
|||||||
MaxIdleConns: 1,
|
MaxIdleConns: 1,
|
||||||
MaxIdleConnsPerHost: 1,
|
MaxIdleConnsPerHost: 1,
|
||||||
MaxConnsPerHost: 1,
|
MaxConnsPerHost: 1,
|
||||||
IdleConnTimeout: time.Second,
|
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
MinVersion: tls.VersionTLS12,
|
MinVersion: tls.VersionTLS12,
|
||||||
ServerName: destinationTLSName,
|
ServerName: destinationTLSName,
|
||||||
|
|||||||
Reference in New Issue
Block a user