Update wireguard

pull/1897/head
Ystinia Zalatova 2025-10-29 12:49:53 +00:00 committed by GitHub
parent 472e2c6050
commit 4a9ff6e1ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -7,8 +7,6 @@ WG_PRIVKEY="$(fw_printenv -n wg_privkey)"
( echo "#" ( echo "#"
echo "[Interface]" echo "[Interface]"
echo "PrivateKey = $WG_PRIVKEY" echo "PrivateKey = $WG_PRIVKEY"
# echo "Address = $(fw_printenv -n wg_address)"
# echo "DNS = $(fw_printenv -n wg_dns)"
echo echo
echo "[Peer]" echo "[Peer]"
echo "Endpoint = $(fw_printenv -n wg_endpoint)" echo "Endpoint = $(fw_printenv -n wg_endpoint)"
@ -27,3 +25,7 @@ if [ -z "$wg_address" ]; then
fi fi
ip address add dev wg0 "$wg_address" ip address add dev wg0 "$wg_address"
ip link set up dev wg0 ip link set up dev wg0
for i in $(fw_printenv -n wg_allowed | tr ',' ' '); do
ip -4 route add "$i" dev wg0
done