Skip to content

Commit

Permalink
feat: generate velocity secret
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed May 13, 2024
1 parent f776145 commit 21f7566
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/bootstrap
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ function install_file() {
# Ensure that all required tools are installed

abort=0
for i in jq git tmux rdiff-backup java; do
for i in jq git tmux rdiff-backup java openssl; do
if ! type "$i" &>/dev/null; then
echo "missing: $i" >&2
abort=1
@@ -128,6 +128,12 @@ for f in $(find contrib/default_config -type f -printf '%P\n'); do
install_file contrib/default_config/"$f" "$f" minecraft: 600
done

VELOCITYSECRET=$(openssl rand -base64 16) \
|| die "Could not generate velocity secret"
install_file <(echo -n "$VELOCITYSECRET") proxy/forwarding.secret minecraft: 600
sed -i 's|{{VELOCITYSECRET}}|'"$VELOCITYSECRET"'|' server/config/paper-global.yml \
|| die "Could not insert velocity secret in paper-global.yml"

echo "Depending on your player base, you might want to allow certain gamplay"
echo "exploits on your server. These are fixed by default in PaperMC, but would"
echo "allow your players to build certain vanilla machines (TNT blast chambers,"

0 comments on commit 21f7566

Please sign in to comment.