| 281 | 281 | console.log('Preferring IPv4 for DNS resolution'); |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | +const ipOptions = ["enabled", "auto", "disabled"]; |
| 285 | + |
| 286 | +if (!ipOptions.includes(enableIPv6)) { |
| 287 | + console.error("`protocol: ipv6` option invalid"); |
| 288 | + process.exit(1) |
| 289 | +} |
| 290 | +if (!ipOptions.includes(enableIPv4)) { |
| 291 | + console.error("`protocol: ipv4` option invalid"); |
| 292 | + process.exit(1) |
| 293 | +} |
| 294 | + |
| 284 | 295 | if (enableIPv6 == "disabled" && enableIPv4 == "disabled") { |
| 285 | 296 | console.error('error: You can\'t disable all internet protocols: at least IPv6 or IPv4 must be enabled.'); |
| 286 | 297 | process.exit(1); |