Initial commit

Basic working code that is capable of establishing the Wireguard tunnel given that there is properly configured `.psk` file for at least one known wifi network (see README.md for more details)
This commit is contained in:
Lukas Stancik
2025-02-27 13:59:58 +00:00
commit 8176e71b81
27 changed files with 1355 additions and 0 deletions
Executable
+39
View File
@@ -0,0 +1,39 @@
#!/bin/sh
set -e
FILES_IN_VAULT='./src/wifi-password.txt
./src/repository-builder/packager.rsa
./src/repository-builder/packager.rsa.pub
./src/wireguard.private.key
./src/wireguard.public.key
./src/authorized_keys'
age_encrypt() {
local input="$1"
local output="$1.tmp"
local AGE_PASSPHRASE=`cat ./.vault_password_file`
./cache/age/age --encrypt --passphrase --armor --output $output $input && rm $input && mv $output $input
}
age_decrypt() {
local input="$1"
local output="$1.tmp"
local AGE_PASSPHRASE=`cat ./.vault_password_file`
./cache/age/age --decrypt --output $output $input && rm $input && mv $output $input
}
encrypt() {
for FILE in $FILES_IN_VAULT; do
age_encrypt $FILE
done
}
decrypt() {
for FILE in $FILES_IN_VAULT; do
age_decrypt $FILE
done
}
$1