diff --git a/srcpkgs/fastd/files/connectionPartner b/srcpkgs/fastd/files/connectionPartner new file mode 100644 index 00000000000..8ae42fe72a1 --- /dev/null +++ b/srcpkgs/fastd/files/connectionPartner @@ -0,0 +1,2 @@ +key "CONNECTION_PARTNER_PUBLIC_KEY"; +remote ipv4 "CONNECTION_PARTNER_ADDRESS" port 10000; diff --git a/srcpkgs/fastd/files/fastd.conf b/srcpkgs/fastd/files/fastd.conf new file mode 100644 index 00000000000..9ce4465c348 --- /dev/null +++ b/srcpkgs/fastd/files/fastd.conf @@ -0,0 +1,8 @@ +log level debug; +interface "mesh-vpn"; +method "salsa2012+gmac"; +bind 0.0.0.0:10000; +include "secret.conf"; +mtu 1426; + +include peers from "peers"; diff --git a/srcpkgs/fastd/files/fastd/run b/srcpkgs/fastd/files/fastd/run new file mode 100755 index 00000000000..86cda0bf159 --- /dev/null +++ b/srcpkgs/fastd/files/fastd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec fastd --config /etc/fastd/fastd.conf diff --git a/srcpkgs/fastd/files/incomingConnectionPartner b/srcpkgs/fastd/files/incomingConnectionPartner new file mode 100644 index 00000000000..da8a12187f3 --- /dev/null +++ b/srcpkgs/fastd/files/incomingConnectionPartner @@ -0,0 +1 @@ +key "INCOMING_CONNECTION_PARTNER_PUBLIC_KEY"; diff --git a/srcpkgs/fastd/files/secret.conf b/srcpkgs/fastd/files/secret.conf new file mode 100644 index 00000000000..2c1a1833d89 --- /dev/null +++ b/srcpkgs/fastd/files/secret.conf @@ -0,0 +1 @@ +secret "YOUR_SECRET_KEY_COMES_IN_HERE"; diff --git a/srcpkgs/fastd/template b/srcpkgs/fastd/template index e2159a4645b..fa090090c5f 100644 --- a/srcpkgs/fastd/template +++ b/srcpkgs/fastd/template @@ -1,7 +1,7 @@ # Template file for 'fastd' pkgname=fastd version=16 -revision=1 +revision=2 build_style=cmake hostmakedepends="cmake pkg-config bison" makedepends="libuecc-devel libsodium-devel json-c-devel libcap-devel" @@ -12,3 +12,17 @@ homepage="https://projects.universe-factory.net/projects/fastd" distfiles="http://git.universe-factory.net/fastd/snapshot/fastd-${version}.tar" checksum=156b64c8f1acd5e8e42abec069e0ad4caa8c01d9fcd374cb6b494c75268ee046 configure_args="ENABLE_LTO=ON" +conf_files=" + /etc/fastd/secret.conf + /etc/fastd/fastd.conf + /etc/fastd/peers/incomingConnectionPartner + /etc/fastd/peers/connectionPartner" + +post_install() { + vmkdir etc/fastd/peers + vinstall ${FILESDIR}/fastd.conf 644 etc/fastd + vinstall ${FILESDIR}/secret.conf 600 etc/fastd + vinstall ${FILESDIR}/connectionPartner 644 etc/fastd/peers + vinstall ${FILESDIR}/incomingConnectionPartner 644 etc/fastd/peers + vsv fastd +}