[WireGuard] OpenWRT package for wireguard

Baptiste Jonglez baptiste at bitsofnetworks.org
Wed Jun 29 13:24:23 CEST 2016


Hi there,

I am working on an OpenWRT/LEDE package for wireguard.  It's mostly done,
but I want to test it before pushing it to the repositories.  Hopefully, I
will be able to do that this week-end.

In the meantime, if somebody wants to test the package, the Makefile is
attached to this email.

Baptiste
-------------- next part --------------
# 
# Copyright (C) 2016 Baptiste Jonglez <openwrt at bitsofnetworks.org>
#
# 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

PKG_RELEASE:=1
# Temporary
PKG_VERSION:=0.0.0
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_USE_MIPS16:=0

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=aa8fcc678092aaab4a8f986e45b696d72d2029ce
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

PKG_BUILD_PARALLEL:=1

# Wireguard's makefile needs this to know where to build the kernel module
export KERNELDIR:=$(LINUX_DIR)

include $(INCLUDE_DIR)/package.mk

define Package/wireguard
  SECTION:=net
  CATEGORY:=Network
  URL:=https://www.wireguard.io
  MAINTAINER:=Baptiste Jonglez <openwrt at bitsofnetworks.org>
  TITLE:=Wireguard userspace control program
  DEPENDS:=+libmnl +kmod-wireguard
endef

define Package/wireguard/description
  WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
  state-of-the-art cryptography. It aims to be faster, simpler, leaner, and
  more useful than IPSec, while avoiding the massive headache. It intends to
  be considerably more performant than OpenVPN.  WireGuard is designed as a
  general purpose VPN for running on embedded interfaces and super computers
  alike, fit for many different circumstances.
  It runs over UDP.

  This package provides the userspace control program for wireguard, wg.
endef

define KernelPackage/wireguard
  SECTION:=kernel
  CATEGORY:=Kernel modules
  SUBMENU:=Network Support
  TITLE:=Wireguard kernel module
  KCONFIG:=CONFIG_NET_UDP_TUNNEL CONFIG_IPV6 CONFIG_NETFILTER_XT_MATCH_HASHLIMIT
  DEPENDS:=@IPV6 +kmod-udptunnel4 +kmod-udptunnel6 +kmod-ipt-hashlimit
  FILES:= $(PKG_BUILD_DIR)/wireguard.$(LINUX_KMOD_SUFFIX)
  AUTOLOAD:=$(call AutoLoad,33,wireguard)
endef

define KernelPackage/wireguard/description
  WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
  state-of-the-art cryptography. It aims to be faster, simpler, leaner, and
  more useful than IPSec, while avoiding the massive headache. It intends to
  be considerably more performant than OpenVPN.  WireGuard is designed as a
  general purpose VPN for running on embedded interfaces and super computers
  alike, fit for many different circumstances.
  It runs over UDP.

  This package provides the kernel module for wireguard.
endef

define Build/Prepare
	$(call Build/Prepare/Default)
	mkdir -p $(PKG_BUILD_DIR)
	$(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Package/wireguard/install
	$(INSTALL_DIR) $(1)/usr/bin/
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/wg $(1)/usr/bin/
endef

$(eval $(call BuildPackage,wireguard))
$(eval $(call KernelPackage,wireguard))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20160629/a7d542e2/attachment.asc>


More information about the WireGuard mailing list