Update IKEv2 script
- Display a note if no password is required when importing client config files. - Advanced users can now define VPN_PROTECT_CONFIG=yes when setting up IKEv2, if they want to protect client config files with a password.
This commit is contained in:
parent
a1dc396883
commit
4bc8fba344
@ -150,7 +150,7 @@ confirm_or_abort() {
|
|||||||
show_header() {
|
show_header() {
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
|
|
||||||
IKEv2 Script Copyright (c) 2020-2022 Lin Song 15 Feb 2022
|
IKEv2 Script Copyright (c) 2020-2022 Lin Song 16 Feb 2022
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
@ -595,11 +595,17 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_config_password() {
|
check_config_password() {
|
||||||
if grep -qs '^IKEV2_CONFIG_PASSWORD=.\+' "$CONFIG_FILE"; then
|
use_config_password=0
|
||||||
use_config_password=1
|
case $VPN_PROTECT_CONFIG in
|
||||||
else
|
[yY][eE][sS])
|
||||||
use_config_password=0
|
use_config_password=1
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
if grep -qs '^IKEV2_CONFIG_PASSWORD=.\+' "$CONFIG_FILE"; then
|
||||||
|
use_config_password=1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
select_config_password() {
|
select_config_password() {
|
||||||
@ -1204,6 +1210,12 @@ cat <<EOF
|
|||||||
*IMPORTANT* Password for client config files:
|
*IMPORTANT* Password for client config files:
|
||||||
$p12_password
|
$p12_password
|
||||||
Write this down, you'll need it for import!
|
Write this down, you'll need it for import!
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
cat <<'EOF'
|
||||||
|
|
||||||
|
Note: No password is required when importing
|
||||||
|
client config files.
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user