Skip to content

Commit

Permalink
bmx7: add wireguard plugin
Browse files Browse the repository at this point in the history
BMX7 now support wireguard tunnels via a new plugin[0].

[0]: bmx-routing/bmx7#52

Signed-off-by: Paul Spooren <mail@aparcar.org>
  • Loading branch information
aparcar committed Aug 30, 2019
1 parent ff5100e commit 2e77d6d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bmx7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ define Package/bmx7
MENU:=1
endef

define Build/Prepare
$(call Build/Prepare/Default)
$(CP) $(PKG_BUILD_DIR)/src/* $(PKG_BUILD_DIR)/
endef

define Package/bmx7-uci-config
$(call Package/bmx7/Default)
DEPENDS:=bmx7 +libuci
Expand Down Expand Up @@ -83,6 +88,12 @@ define Package/bmx7-tun
TITLE:=ipip-based tunnel plugin (recommended!)
endef

define Package/bmx7-wg-tun
$(call Package/bmx7/Default)
DEPENDS:=bmx7
TITLE:=wireguard-based tunnel plugin
endef

define Package/bmx7-table
$(call Package/bmx7/Default)
DEPENDS:=bmx7 +bmx7-tun
Expand Down Expand Up @@ -150,6 +161,11 @@ define Package/bmx7-tun/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx7_tun/bmx7_tun.so $(1)/usr/lib/bmx7_tun.so
endef

define Package/bmx7-wg-tun/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx7_wg_tun/bmx7_wg_tun.so $(1)/usr/lib/bmx7_wg_tun.so
endef

define Package/bmx7-table/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx7_table/bmx7_table.so $(1)/usr/lib/bmx7_table.so
Expand All @@ -163,3 +179,4 @@ $(eval $(call BuildPackage,bmx7-json))
$(eval $(call BuildPackage,bmx7-sms))
$(eval $(call BuildPackage,bmx7-table))
$(eval $(call BuildPackage,bmx7-tun))
$(eval $(call BuildPackage,bmx7-wg-tun))
3 changes: 3 additions & 0 deletions bmx7/files/etc/config/bmx7
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ config 'dev' 'mesh_2'

#config 'plugin'
# option 'plugin' 'bmx7_tun.so'
#
#config 'plugin'
# option 'plugin' 'bmx7_wg_tun.so'

#config 'plugin'
# option 'plugin' 'bmx7_table.so'
Expand Down

0 comments on commit 2e77d6d

Please sign in to comment.