mirror of
https://github.com/mikedilger/chorus.git
synced 2026-01-03 06:15:33 +00:00
Files for testing chorus with relay-tester
This commit is contained in:
parent
2ca4b17b73
commit
3f15894aaa
3
test_with_relay_tester/.gitignore
vendored
Normal file
3
test_with_relay_tester/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
data
|
||||
relay-tester
|
||||
|
||||
12
test_with_relay_tester/README.md
Normal file
12
test_with_relay_tester/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Testing Chorus with relay-tester
|
||||
|
||||
First, git clone https://github.com/mikedilger/relay-tester and build that project
|
||||
(cargo build --release).
|
||||
|
||||
Then copy that target/release/relay-tester binary into this directory.
|
||||
|
||||
Then run from two different shells, in this order:
|
||||
|
||||
shell1: ./test_chorus.sh
|
||||
|
||||
shell2: ./run_relay_tester.sh
|
||||
12
test_with_relay_tester/run_relay_tester.sh
Executable file
12
test_with_relay_tester/run_relay_tester.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -x relay-tester ] ; then
|
||||
echo "You must build https://github.com/mikedilge/relay-tester and copy the "
|
||||
echo "resultant target/release/relay-tester binary into this directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./relay-tester \
|
||||
ws://localhost:8080/ \
|
||||
nsec16xfd467kyd3xpu9x5u4933u00v73xrl0jyq9rk5ktd9t2j38k20qtwxuj3 \
|
||||
nsec1l50yuf6uxm2l5qxm87fkm56z3m7g88jnfy5s6az5wscxpu5l2yqq6qwk88
|
||||
10
test_with_relay_tester/test_chorus.sh
Executable file
10
test_with_relay_tester/test_chorus.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Use ws://localhost:8080/ as the relay url"
|
||||
|
||||
cargo build --release
|
||||
rm -rf ./data/
|
||||
../target/release/chorus_init ./test_chorus.toml
|
||||
../target/release/chorus_cmd ./test_chorus.toml add_user de16d3ed2d5ceb91d33e39dbe30585164e0c19f3f2e2a5b121def086b447a2e5 0
|
||||
../target/release/chorus_cmd ./test_chorus.toml add_user 35d6bbcf17fc31a9c4f7a2f68aa40ad32c8f9de1ae77505dc5eb3722d8b2987d 0
|
||||
../target/release/chorus ./test_chorus.toml
|
||||
40
test_with_relay_tester/test_chorus.toml
Normal file
40
test_with_relay_tester/test_chorus.toml
Normal file
@ -0,0 +1,40 @@
|
||||
# See contrib/chorus.toml for a documented config file
|
||||
|
||||
data_directory = "./data"
|
||||
ip_address = "127.0.0.1"
|
||||
port = 8080
|
||||
hostname = "localhost"
|
||||
chorus_is_behind_a_proxy = false
|
||||
use_tls = false
|
||||
certchain_pem_path = "tls/fullchain.pem"
|
||||
key_pem_path = "tls/privkey.pem"
|
||||
name = "Chorus Sample"
|
||||
description = "A sample run of the Chorus relay"
|
||||
#icon_url =
|
||||
open_relay = false
|
||||
admin_hex_keys = [
|
||||
"ee11a5dff40c19a555f41fe42b48f00e618c91225622ae37b6c2bb67b76c4e49",
|
||||
|
||||
# npub1mctd8mfdtn4er5e788d7xpv9ze8qcx0n7t32tvfpmmcgddz85tjsuyxe7z
|
||||
"de16d3ed2d5ceb91d33e39dbe30585164e0c19f3f2e2a5b121def086b447a2e5",
|
||||
|
||||
# npub1xhtthnchlsc6n38h5tmg4fq26vkgl80p4em4qhw9avmj9k9jnp7sm78ql6
|
||||
"35d6bbcf17fc31a9c4f7a2f68aa40ad32c8f9de1ae77505dc5eb3722d8b2987d"
|
||||
]
|
||||
verify_events = true
|
||||
allow_scraping = false
|
||||
allow_scrape_if_limited_to = 100
|
||||
allow_scrape_if_max_seconds = 7200
|
||||
max_subscriptions = 128
|
||||
serve_ephemeral = true
|
||||
serve_relay_lists = true
|
||||
server_log_level = "Info"
|
||||
library_log_level = "Info"
|
||||
client_log_level = "Debug"
|
||||
enable_ip_blocking = false
|
||||
minimum_ban_seconds = 1
|
||||
timeout_seconds = 60
|
||||
max_connections_per_ip = 5
|
||||
throttling_bytes_per_second = 131072
|
||||
throttling_burst = 4194304
|
||||
enable_negentropy = true
|
||||
Loading…
x
Reference in New Issue
Block a user