Change protocol type

This commit is contained in:
Iurii Egorov 2023-11-29 22:22:28 +03:00
parent a1551010e5
commit 72a1165143

View file

@ -87,9 +87,9 @@ auto_su() {
add_if() {
local ret
if ! cmd ip link add "$INTERFACE" type amnezia; then
if ! cmd ip link add "$INTERFACE" type amneziawg; then
ret=$?
[[ -e /sys/module/amnezia ]] || ! command -v "${WG_QUICK_USERSPACE_IMPLEMENTATION:-wireguard-go}" >/dev/null && exit $ret
[[ -e /sys/module/amneziawg ]] || ! command -v "${WG_QUICK_USERSPACE_IMPLEMENTATION:-wireguard-go}" >/dev/null && exit $ret
echo "[!] Missing WireGuard (Amnezia VPN) kernel module. Falling back to slow userspace implementation." >&2
cmd "${WG_QUICK_USERSPACE_IMPLEMENTATION:-wireguard-go}" "$INTERFACE"
fi