phpAddr enclose IP6 in [square brackets]

This commit is contained in:
Asif Bacchus 2019-01-08 01:33:37 -07:00
parent 60e1a34c8f
commit a83e0da7fa
2 changed files with 9 additions and 6 deletions

View File

@ -6,13 +6,13 @@
-1,
19,
54,
751,
754,
68,
-1,
-1,
-1,
640,
616
-1,
-1
]
}
]

View File

@ -592,8 +592,11 @@ if [ "${phpType}" = "tcp" ]; then
exit 1
;;
*)
# check basic format validity
if [[ "${inputPHPAddr}" =~ ^${regexIP6}$ ]] || [[ "${inputPHPAddr}" =~ ^${regexIP4}$ ]]; then
# check basic format validity and wrap IP6 in [square brackets]
if [[ "${inputPHPAddr}" =~ ^${regexIP6}$ ]]; then
phpAddr="[${inputPHPAddr}]"
break
elif [[ "${inputPHPAddr}" =~ ^${regexIP4}$ ]]; then
phpAddr="${inputPHPAddr}"
break
else
@ -762,7 +765,7 @@ echo "KeyPath: $KeyPath"
echo "noOSCP: $noOSCP"
echo "CA-Chain: $CAChainPath"
echo "DHPath: $DHPath"
echo "Generating DH Params? $generateDH"
echo "Generating DH Params: $generateDH"
echo -e "${cyan}--------------------${norm}"
echo "usePHP: $usePHP"
echo "PHP listen type: $phpType"