mirror of
https://github.com/angristan/wireguard-install.git
synced 2024-11-24 05:56:02 +03:00
Update confirmation
This commit is contained in:
parent
8c9c13e582
commit
a09de9c57a
@ -69,6 +69,9 @@ read -rp "First DNS resolver to use for the client: " -e -i "$CLIENT_DNS_1" CLIE
|
|||||||
CLIENT_DNS_2="176.103.130.131"
|
CLIENT_DNS_2="176.103.130.131"
|
||||||
read -rp "Second DNS resolver to use for the client: " -e -i "$CLIENT_DNS_2" CLIENT_DNS_2
|
read -rp "Second DNS resolver to use for the client: " -e -i "$CLIENT_DNS_2" CLIENT_DNS_2
|
||||||
|
|
||||||
|
# Ask for pre-shared symmetric key
|
||||||
|
read -rp "Want to use pre-shared symmetric key? [y/N] " is_pre_symm
|
||||||
|
|
||||||
if [[ $SERVER_PUB_IPV6_USED = 'y' ]]; then
|
if [[ $SERVER_PUB_IPV6_USED = 'y' ]]; then
|
||||||
ENDPOINT="[$SERVER_PUB_IP]:$SERVER_PORT"
|
ENDPOINT="[$SERVER_PUB_IP]:$SERVER_PORT"
|
||||||
else
|
else
|
||||||
@ -132,9 +135,8 @@ PublicKey = $SERVER_PUB_KEY
|
|||||||
Endpoint = $ENDPOINT
|
Endpoint = $ENDPOINT
|
||||||
AllowedIPs = 0.0.0.0/0,::/0" >> "$HOME/$SERVER_WG_NIC-client.conf"
|
AllowedIPs = 0.0.0.0/0,::/0" >> "$HOME/$SERVER_WG_NIC-client.conf"
|
||||||
|
|
||||||
# Ask for pre-shared symmetric key
|
# Add pre shared symmetric key to respective files
|
||||||
read -r -p "Want to use pre-shared symmetric key? [y/N] " response
|
case "$is_pre_symm" in
|
||||||
case "$response" in
|
|
||||||
[yY][eE][sS]|[yY])
|
[yY][eE][sS]|[yY])
|
||||||
CLIENT_SYMM_PRE_KEY=$( wg genpsk )
|
CLIENT_SYMM_PRE_KEY=$( wg genpsk )
|
||||||
echo "PresharedKey = $CLIENT_SYMM_PRE_KEY" >> "/etc/wireguard/$SERVER_WG_NIC.conf"
|
echo "PresharedKey = $CLIENT_SYMM_PRE_KEY" >> "/etc/wireguard/$SERVER_WG_NIC.conf"
|
||||||
|
Loading…
Reference in New Issue
Block a user