Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
fix custom dns misplacement
Browse files Browse the repository at this point in the history
  • Loading branch information
finzzz committed May 5, 2021
1 parent 9cca871 commit 2be7468
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wgzero
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ Address = $CLIENT_IP/32
PrivateKey = $(cat "$CONFIGFOLDER/$NAME/priv.key")
EOF

Read "DNS" "none" && [ "$VAL" != "none" ] && echo "DNS = $VAL" >> "$CONFIGFOLDER/$NAME/conf"

PUBKEY=$(cat "$CONFIGFOLDER/pub.key")
ENDPOINT="$(GetConf server):$(GetConf port)"

Expand All @@ -275,9 +277,7 @@ EOF

sed -i "s|^AllowedIPs.*$|&, $IPv6Addr/128|g" "$TMP"
fi

# advanced config
Read "DNS" "none" && [ "$VAL" != "none" ] && echo "DNS = $VAL" >> "$CONFIGFOLDER/$NAME/conf"

Read "Edit allowed IPs?" "y/N"
if [ "$VAL" == "y" ]; then
ALLOWEDIPS=$(grep -i allowedips "$CONFIGFOLDER/$NAME/conf" | tr -d " " | cut -d "=" -f 2)
Expand Down

0 comments on commit 2be7468

Please sign in to comment.