forked from yury-sannikov/awg-openwrt
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
83 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
# Copyright 2016-2017 Dan Luedtke <[email protected]> | ||
# Licensed to the public under the Apache License 2.0. | ||
|
||
# shellcheck disable=SC1091,SC3003,SC3043 | ||
|
||
WG=/usr/bin/awg | ||
if [ ! -x $WG ]; then | ||
logger -t "amneziawg" "error: missing amneziawg-tools (${WG})" | ||
|
@@ -30,9 +28,7 @@ proto_amneziawg_init_config() { | |
proto_config_add_int "awg_h2" | ||
proto_config_add_int "awg_h3" | ||
proto_config_add_int "awg_h4" | ||
# shellcheck disable=SC2034 | ||
available=1 | ||
# shellcheck disable=SC2034 | ||
no_proto_task=1 | ||
} | ||
|
||
|
@@ -139,7 +135,7 @@ ensure_key_is_generated() { | |
local private_key | ||
private_key="$(uci get network."$1".private_key)" | ||
|
||
if [ "$private_key" = "generate" ]; then | ||
if [ "$private_key" == "generate" ]; then | ||
local ucitmp | ||
oldmask="$(umask)" | ||
umask 077 | ||
|
@@ -201,7 +197,7 @@ proto_amneziawg_setup() { | |
|
||
if proto_amneziawg_is_kernel_mode; then | ||
logger -t "amneziawg" "info: using kernel-space kmod-amneziawg for ${WG}" | ||
ip link del dev "${config}" 2>/dev/null | ||
ip link del dev "${config}" 2>/dev/null | ||
ip link add dev "${config}" type amneziawg | ||
else | ||
logger -t "amneziawg" "info: using user-space amneziawg-go for ${WG}" | ||
|
@@ -291,8 +287,7 @@ proto_amneziawg_setup() { | |
|
||
# endpoint dependency | ||
if [ "${nohostroute}" != "1" ]; then | ||
# shellcheck disable=SC2034 | ||
${WG} show "${config}" endpoints | \ | ||
awg show "${config}" endpoints | \ | ||
sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \ | ||
while IFS=$'\t ' read -r key address port; do | ||
[ -n "${port}" ] || continue | ||
|
@@ -305,7 +300,6 @@ proto_amneziawg_setup() { | |
|
||
proto_amneziawg_teardown() { | ||
local config="$1" | ||
proto_amneziawg_check_installed | ||
if proto_amneziawg_is_kernel_mode; then | ||
ip link del dev "${config}" >/dev/null 2>&1 | ||
else | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,14 @@ include $(TOPDIR)/rules.mk | |
include $(INCLUDE_DIR)/kernel.mk | ||
|
||
PKG_NAME:=kmod-amneziawg | ||
PKG_VERSION:=0.0.1 | ||
PKG_RELEASE:=1 | ||
PKG_VERSION:=1.0.0 | ||
PKG_RELEASE:=$(AUTORELEASE) | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define KernelPackage/amneziawg | ||
SECTION:=kernel | ||
CATEGORY:=Kernel Modules | ||
CATEGORY:=Kernel modules | ||
SUBMENU:=Network Support | ||
URL:=https://amnezia.org/ | ||
MAINTAINER:=Amnezia Admin <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -225,7 +225,7 @@ index 5506738..b45253d 100644 | |
goto err_netlink; | ||
|
||
- pr_info("WireGuard " WIREGUARD_VERSION " loaded. See www.wireguard.com for information.\n"); | ||
+ pr_info("WireGuard " WIREGUARD_VERSION " (Amnezia VPN) loaded. See www.wireguard.com for information.\n"); | ||
+ pr_info("WireGuard " WIREGUARD_VERSION " (AmneziaWG) loaded. See www.amnezia.org for information.\n"); | ||
pr_info("Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved.\n"); | ||
|
||
return 0; | ||
|
@@ -234,7 +234,7 @@ index 5506738..b45253d 100644 | |
module_exit(wg_mod_exit); | ||
MODULE_LICENSE("GPL v2"); | ||
-MODULE_DESCRIPTION("WireGuard secure network tunnel"); | ||
+MODULE_DESCRIPTION("WireGuard (Amnezia VPN) secure network tunnel"); | ||
+MODULE_DESCRIPTION("WireGuard (AmneziaWG) secure network tunnel"); | ||
MODULE_AUTHOR("Jason A. Donenfeld <[email protected]>"); | ||
MODULE_VERSION(WIREGUARD_VERSION); | ||
MODULE_ALIAS_RTNL_LINK(KBUILD_MODNAME); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,10 @@ | |
include $(TOPDIR)/rules.mk | ||
|
||
PKG_MAINTAINER:=Amnezia Admin <[email protected]> | ||
PKG_VERSION:=0.0.1-1 | ||
LUCI_TITLE:=AmneziaWG Web UI | ||
PKG_VERSION:=1.0.0-$(AUTORELEASE) | ||
LUCI_TITLE:=Support for AmneziaWG Web UI | ||
LUCI_DESCRIPTION:=Provides Web UI for AmneziaWG | ||
LUCI_DEPENDS:=+luci-base +amneziawg-tools +ucode | ||
LUCI_DEPENDS:=+amneziawg-tools +ucode | ||
LUCI_PKGARCH:=all | ||
|
||
PKG_PROVIDES:=luci-proto-amneziawg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters