From faad7ddc93f54eca4d110daae57649657e111913 Mon Sep 17 00:00:00 2001 From: mleku Date: Wed, 10 Sep 2025 14:23:57 +0100 Subject: [PATCH] add relay-tester scripts --- scripts/relaytester-install.sh | 19 +++++++++++++++++++ scripts/relaytester-test.sh | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 scripts/relaytester-install.sh create mode 100755 scripts/relaytester-test.sh diff --git a/scripts/relaytester-install.sh b/scripts/relaytester-install.sh new file mode 100755 index 0000000..4efcd11 --- /dev/null +++ b/scripts/relaytester-install.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +## rust must be installed +if ! command -v "cargo" &> /dev/null; then + echo "rust and cargo is not installed." + echo "run this command to install:" + echo + echo "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh" + exit +else + echo "cargo is installed." +fi + +rm -rf relay-tester +git clone https://github.com/mikedilger/relay-tester.git +cd relay-tester +cargo build -r +cp target/release/relay-tester $GOBIN/ +cd .. +rm -rf relay-tester \ No newline at end of file diff --git a/scripts/relaytester-test.sh b/scripts/relaytester-test.sh new file mode 100755 index 0000000..6cadd0e --- /dev/null +++ b/scripts/relaytester-test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +## relay-tester must be installed +if ! command -v "relay-tester" &> /dev/null; then + echo "relay-tester is not installed." + echo "run this command to install:" + echo + echo "./scripts/relaytester-install.sh" + exit +fi +export ORLY_LOG_LEVEL=trace +export ORLY_LISTEN=127.0.0.1 +export ORLY_PORT=3334 +export ORLY_IP_WHITELIST=127.0.0 +export ORLY_ADMINS=nsec12l4072hvvyjpmkyjtdxn48xf8qj299zw60u7ddg58s2aphv3rpjqtg0tvr,nsec1syvtjgqauyeezgrev5nqrp36d87apjk87043tgu2usgv8umyy6wq4yl6tu +go run . & +sleep 2 +relay-tester ws://127.0.0.1:3334 nsec12l4072hvvyjpmkyjtdxn48xf8qj299zw60u7ddg58s2aphv3rpjqtg0tvr nsec1syvtjgqauyeezgrev5nqrp36d87apjk87043tgu2usgv8umyy6wq4yl6tu +killall next.orly.dev \ No newline at end of file