You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
700 B

3 years ago
#!/usr/bin/env bash
test() {
for dir in tor/data/*
do
(
hs=$(cat $dir/hostname)
curl -s --socks5-hostname 127.0.0.1:9050 http://$hs | grep --silent Server \
&& echo -n "/" \
|| echo -n "X"
) &
done
wait
echo
}
echo "Starting services..."
docker compose up -d
sleep 1
echo
echo "Created $(ls tor/data | wc -l) hidden services"
echo
echo "Testing hidden services..."
echo "/ = up X = down"
echo
test
echo
echo "Waiting 10 seconds..."
sleep 10
test
echo
echo "Waiting 10 seconds..."
sleep 10
test
echo
echo "Waiting 10 seconds..."
sleep 10
test
echo
echo "Waiting 10 seconds..."
sleep 10
test
echo
echo "Stopping services..."
docker compose down