mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-09 20:29:23 +02:00
fix(openvpn/extract): restrict custom openvpn config protocol to tcp or udp internally
- Fix #3179 - I believe specifying tcp4, tcp6 or tcp-client does not change anything versus tcp + remote ip address - I believe specifying udp4 or udp6 does not change anything versus tcp + remote ip address - Simplify firewall code to not account for tcp-client etc.
This commit is contained in:
@@ -105,7 +105,7 @@ func Test_extractDataFromLine(t *testing.T) {
|
||||
},
|
||||
"tcp-client": {
|
||||
line: "proto tcp-client",
|
||||
protocol: "tcp-client",
|
||||
protocol: constants.TCP,
|
||||
},
|
||||
"extract remote error": {
|
||||
line: "remote bad",
|
||||
@@ -239,7 +239,7 @@ func Test_extractRemote(t *testing.T) {
|
||||
},
|
||||
"invalid protocol": {
|
||||
line: "remote 1.2.3.4 8000 bad",
|
||||
err: errors.New("network protocol not supported: bad"),
|
||||
err: errors.New("parsing protocol from remote line: network protocol not supported: bad"),
|
||||
},
|
||||
"IP host and port and protocol": {
|
||||
line: "remote 1.2.3.4 8000 udp",
|
||||
|
||||
Reference in New Issue
Block a user