Fix: use udp by default for custom openvpn config

This commit is contained in:
Quentin McGaw
2021-03-15 02:13:10 +00:00
parent fa220f9e93
commit de82d4e616

View File

@@ -171,7 +171,7 @@ func extractConnectionFromLines(lines []string) ( //nolint:gocognit
switch connection.Protocol { switch connection.Protocol {
case "": case "":
return connection, fmt.Errorf("%w: network protocol not found", errExtractConnection) connection.Protocol = "udp"
case "tcp", "udp": case "tcp", "udp":
default: default:
return connection, fmt.Errorf("%w: network protocol not supported: %s", errExtractConnection, connection.Protocol) return connection, fmt.Errorf("%w: network protocol not supported: %s", errExtractConnection, connection.Protocol)