aports/config/wireguard/APKBUILD

81 lines
3.5 KiB
Plaintext
Raw Normal View History

2020-11-20 16:31:49 +00:00
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
2021-02-07 21:36:32 +00:00
. ../APKBUILD-config.template
2021-02-07 21:36:32 +00:00
2023-05-01 13:02:31 +00:00
pkgver=2023.04.28.03
pkgrel=0
2021-02-07 21:36:32 +00:00
subpackages="$pkgname-sysctl"
2020-11-20 16:31:49 +00:00
source="
secret
2020-11-20 16:31:49 +00:00
main.conf
2020-12-13 01:33:40 +00:00
sysctl.conf
2020-11-20 16:31:49 +00:00
"
_users=""
build() {
. secret
: "${WIREGUARD_PRIVATEKEY:?'Private key missing'}"
cp main.conf main.conf.private
rx_replace "WIREGUARD_PRIVATEKEY" "$WIREGUARD_PRIVATEKEY" main.conf.private
for i in $_users; do
2022-03-18 18:43:17 +00:00
local peer="${i#*::}"
local v4="${i%::*}"
local v6="$(printf '%X' "$v4")"
msg "Added $peer as v4:$v4 v6:$v6"
printf "[Peer]\nPublicKey = %s\nAllowedIPs = 172.22.12.%s/32, fd42:42:42::2:%s/128\n" "$peer" "$v4" "$v6" >> main.conf.private
done
}
2020-11-20 16:31:49 +00:00
package() {
rx_install main.conf.private rxmain.conf
2021-02-07 21:36:32 +00:00
}
sysctl() {
install_if="redxen-config-wireguard"
_rx_installdir="/etc/sysctl.d" rx_install sysctl.conf 90-wireguard.conf
2020-11-20 16:31:49 +00:00
}
adduser() {
for i in $@; do
_users="$_users $i"
done
}
adduser "2::Xb+ASR5NdnIB+dXWEA4H0V3d0LC0KocKeFeQDyqDqjk=" \
2022-05-20 19:42:17 +00:00
"3::kz9vLMnPtfka11n1EJpzHb4966ieJSo4BU1P2joHLXo=" \
2022-09-24 19:12:02 +00:00
"4::W8k/yWhOrNlwgkN1wAsfc+6qNIex0vlVd9ISZbF3RXc=" \
"5::ZZ3W7f8LCAxkJXYLB2djwqj01YhUYvFoQApm9B5QlEY=" \
"6::whrrWh3kRfaYCbLo51x3o5Sd/8fnDf3GrsdQ2eMliig=" # caskd <caskd@redxen.eu>
adduser "12::2FRcncz/oSmqFQLrHqICi4fEkgxrCeS9P8TTv5gcfCw=" # cherry <cherry@redxen.eu>
adduser "16::d459SqKVWko+wBhoFrU+yrFVM4BqI8FSmPtdrWepkw0=" # viggi <viggi@redxen.eu>
adduser "18::Fb8sYfZghohEpznWpt46x1cmmkymt2ksQL7fEBI6qlc=" # MartijnTim <martijntim@redxen.eu>
adduser "20::QHx0BCbRDKXX3OvdZwX9jYN2BMJPcPj4r/gYekkBTXY=" \
"21::THwCjbASYrGxjOiw/gvmiiXoQJpQF1LzLXbaEW8FVU4=" # Nova <novaburst@kalli.st>
adduser "24::zPg/v+EVJUhrSe1a3+ayzJuXakWUbgvcTgv3j4T11ks=" \
"25::ht/GLP/r7WWM2JP0Ya+vdA7+aigoy9tY8b4wOm2VAUg=" \
"26::PrGVHgZAM6vSK4I70QgYurIinKZE3b2Rrq5NQ8RDqS8=" # Shokara <shokara@snopyta.org>
adduser "30::S/4jSds8CNsyk1SjI03AxWtB3E9lhtW49dia+x9hoVs=" \
"31::SFPtaY7fn632wJXIkVYFtaPop7fGoX6pEkTkqZklHXM=" \
"32::g9hn9jKFUwU7cijAuleeDUL2EqiAOD8shY/pTAk0qTA=" \
"33::JlvGHLrhbce2yQAQEgbnIduXNwswTW9VIkDwvtOEiVQ=" # deavmi <deavmi@redxen.eu>
2021-09-18 16:01:01 +00:00
adduser "34::X2kLcgAhs9bnHTNhBtt2awqXIZu0nJmYIZ6bmqQETCs=" # anewone <anewone@posteo.de>
2022-06-23 18:04:11 +00:00
adduser "36::nyP4szPjl0u1m6SgkAAClHO0M+vm7PiDBqNX4ehJ0Ts=" \
"37::qRGqVZ6nbIjkF2L/kzsyyY539J4L/bDPBmcjF9yUxk8=" # Ty3r0X <ty3r0x@disroot.org>
2022-03-29 14:28:52 +00:00
adduser "38::ESBfwOJEbFRf1K2qk2cCtal8BlEghH7jWtMu1uKoE3Q=" # Schorsch <genickschorsch@redxen.eu>
2022-03-30 11:52:54 +00:00
adduser "40::1Kzfb15Y3kmub2Pdq0Eh3AwIbZd2kQTT4X2Uy1L+GHo=" \
"41::KbPB7gpE+4UwxKwm1WphbsXagBoKM1rIvlvTA5xBUR0=" # jole <jole@redxen.eu>
adduser "42::PYPaxtqy5zkRnv8RDM6oS4wcUGSEKRSR6xhw671yTRI=" \
"43::VmAZ+V5Go8nFla173LgUeUgfNgxmtECT3PRRVgZ+mRM=" # lagemeet <lagemeet@disroot.org>
adduser "45::4gaUgUFu3DpFdkb3AZ07e4J/zjZ+Uav+nG4B8ZOT9Sc=" # renken <rx@shione.net>
2022-10-17 17:21:13 +00:00
adduser "47::CXY/9aCbdx2v7+YvqBs77LwFppMbVt2cfw0XBcNETng=" # joe <joe@joeth.uk>
2023-03-15 08:42:43 +00:00
adduser "50::a7vEjLPV06MyoQJy0fFL4V8ENF/385DA5byvthi8OUw=" # Fortis <ananasus359@gmail.com>
2023-05-01 13:02:31 +00:00
adduser "54::qGz4kqEHYBMTiJKTPsxg6PT8HLAc9tO5MCy2j4doOiY=" # LucyTheBeaver (https://t.me/LucyTheBeaver) <>
sha512sums="
72d9999cd7a0be1f334cdf4690c56dac591f6149176a74e70dda7f239d3a82e4c62077efb487e4f59d10b50e24a9d18e3afe0735e7418bf2a4b41623dabdeb87 secret
2021-09-18 16:01:01 +00:00
ac5074884463b3c8ac561a8355b67634d529b1c2c7f05c6200910a158443f9db35603556a2ccd607b841733384136eff21c6cae931ebe2464a8669a6d5a7a433 main.conf
b79ffbc64f2e193dc9402f7506b56b66892aa5387d13ac209ae344f9ce0f17aec3fdc503bf6855650d413dba3b66ffa3f937dd803850028579f5f5ed747c56b0 sysctl.conf
"