AmneziaWG

Материал из База знаний
Перейти к: навигация, поиск


https://docs.amnezia.org/ru/documentation/amnezia-wg

https://github.com/openwrt-xiaomi/awg-openwrt/wiki/AmneziaWG-installing


#!/bin/bash
# From: https://github.com/openwrt-xiaomi/awg-openwrt/wiki/AmneziaWG-installing

if [ "$1" == "" ]; then
  echo -e "\n VPN Client configs:"
  cat /etc/amnezia/amneziawg/awg0.conf | grep "_Name" | sed "s/^.* = /\t/"
  echo -e "=================================="
  echo -e "\n\tUsage: $0 <UserName>\n"
  exit 1
fi

cd /etc/amnezia/clients
python3 awgcfg.py -a $1 2>/dev/null
python3 awgcfg.py -c
awg-quick down awg0
awg-quick up awg0

echo -e "\nClient config for AmneziaWG:"
echo -e "==================================\n"
cat /etc/amnezia/clients/$1.conf
echo -e "==================================\n"

qrencode -t ansiutf8 -r $1.conf
rm -f *.conf