mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
wireguard: bump to 0.0.20200215
This commit is contained in:
parent
c42496b73f
commit
41392a7bd2
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2016-2018 Jason A. Donenfeld <Jason@zx2c4.com>
|
||||
# Copyright (C) 2016-2019 Jason A. Donenfeld <Jason@zx2c4.com>
|
||||
# Copyright (C) 2016 Baptiste Jonglez <openwrt@bitsofnetworks.org>
|
||||
# Copyright (C) 2016-2017 Dan Luedtke <mail@danrl.com>
|
||||
#
|
||||
@ -11,17 +11,17 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=wireguard
|
||||
|
||||
PKG_VERSION:=0.0.20191012
|
||||
PKG_VERSION:=0.0.20200215
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
|
||||
PKG_HASH:=93573193c9c1c22fde31eb1729ad428ca39da77a603a3d81561a9816ccecfa8e
|
||||
PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
|
||||
PKG_HASH:=0def6f3608ec06f6dfc454aa5281a7c38b06ff27096cb341448d20602da4e923
|
||||
|
||||
PKG_LICENSE:=GPL-2.0 Apache-2.0
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/WireGuard-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/wireguard-linux-compat-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
@ -35,8 +35,7 @@ define Package/wireguard/Default
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=VPN
|
||||
URL:=https://www.wireguard.com
|
||||
MAINTAINER:=Jason A. Donenfeld <Jason@zx2c4.com> \
|
||||
Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
||||
MAINTAINER:=Jason A. Donenfeld <Jason@zx2c4.com>
|
||||
endef
|
||||
|
||||
define Package/wireguard/Default/description
|
||||
@ -57,13 +56,8 @@ endef
|
||||
include $(INCLUDE_DIR)/kernel-defaults.mk
|
||||
include $(INCLUDE_DIR)/package-defaults.mk
|
||||
|
||||
# Used by Build/Compile/Default
|
||||
MAKE_PATH:=src/tools
|
||||
MAKE_VARS += PLATFORM=linux
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules
|
||||
$(call Build/Compile/Default)
|
||||
endef
|
||||
|
||||
define Package/wireguard/install
|
||||
@ -74,27 +68,6 @@ define Package/wireguard/description
|
||||
$(call Package/wireguard/Default/description)
|
||||
endef
|
||||
|
||||
define Package/wireguard-tools
|
||||
$(call Package/wireguard/Default)
|
||||
TITLE:=WireGuard userspace control program (wg)
|
||||
DEPENDS:=+libmnl +ip
|
||||
endef
|
||||
|
||||
define Package/wireguard-tools/description
|
||||
$(call Package/wireguard/Default/description)
|
||||
|
||||
This package provides the userspace control program for WireGuard,
|
||||
`wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
|
||||
endef
|
||||
|
||||
define Package/wireguard-tools/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/wg $(1)/usr/bin/
|
||||
$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/lib/netifd/proto/
|
||||
$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
|
||||
endef
|
||||
|
||||
define KernelPackage/wireguard
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
@ -112,5 +85,4 @@ define KernelPackage/wireguard/description
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,wireguard))
|
||||
$(eval $(call BuildPackage,wireguard-tools))
|
||||
$(eval $(call KernelPackage,wireguard))
|
||||
|
54
package/network/utils/wireguard-tools/Makefile
Normal file
54
package/network/utils/wireguard-tools/Makefile
Normal file
@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (C) 2016-2019 Jason A. Donenfeld <Jason@zx2c4.com>
|
||||
# Copyright (C) 2016 Baptiste Jonglez <openwrt@bitsofnetworks.org>
|
||||
# Copyright (C) 2016-2017 Dan Luedtke <mail@danrl.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=wireguard-tools
|
||||
|
||||
PKG_VERSION:=1.0.20200206
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
|
||||
PKG_HASH:=f5207248c6a3c3e3bfc9ab30b91c1897b00802ed861e1f9faaed873366078c64
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/package-defaults.mk
|
||||
|
||||
MAKE_PATH:=src
|
||||
MAKE_VARS += PLATFORM=linux
|
||||
|
||||
define Package/wireguard-tools
|
||||
$(call Package/wireguard/Default)
|
||||
TITLE:=WireGuard userspace control program (wg)
|
||||
DEPENDS:=+ip
|
||||
endef
|
||||
|
||||
define Package/wireguard-tools/description
|
||||
$(call Package/wireguard/Default/description)
|
||||
|
||||
This package provides the userspace control program for WireGuard,
|
||||
`wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
|
||||
endef
|
||||
|
||||
define Package/wireguard-tools/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wg $(1)/usr/bin/
|
||||
$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/lib/netifd/proto/
|
||||
$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,wireguard-tools))
|
@ -42,6 +42,11 @@ proto_wireguard_setup_peer() {
|
||||
config_get endpoint_port "${peer_config}" "endpoint_port"
|
||||
config_get persistent_keepalive "${peer_config}" "persistent_keepalive"
|
||||
|
||||
if [ -z "$public_key" ]; then
|
||||
echo "Skipping peer config $peer_config because public key is not defined."
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "[Peer]" >> "${wg_cfg}"
|
||||
echo "PublicKey=${public_key}" >> "${wg_cfg}"
|
||||
if [ "${preshared_key}" ]; then
|
Loading…
Reference in New Issue
Block a user