diff --git a/get-hosts.sh b/get-hosts.sh index cfebe33..bb58ee0 100755 --- a/get-hosts.sh +++ b/get-hosts.sh @@ -16,14 +16,14 @@ if command -v agunua >/dev/null; then # Using Agunua is more secure, because it does certificate pinning. # The --insecure option just makes it accept certificates that are # not signed by a (known) CA. - hosts1=$(agunua --insecure --binary --maximum-time 5 \ + hosts1=$(agunua --insecure --binary --maximum-time 20 \ gemini://geminispace.info/known-hosts 2>/dev/null \ | grep "gemini://" | cut -d ' ' -f 3) if [ -z "$hosts1" ]; then >&2 echo "geminispace.info/known-hosts download failed." exit 1 fi - hosts2=$(agunua --insecure --binary --maximum-time 5 \ + hosts2=$(agunua --insecure --binary --maximum-time 20 \ gemini://gemini.bortzmeyer.org/software/lupa/lupa-capsules.txt 2>/dev/null) if [ -z "$hosts2" ]; then >&2 echo "lupa-capsules.txt download failed." @@ -32,14 +32,14 @@ if command -v agunua >/dev/null; then else # If Agunua is not installed, pipe the request into OpenSSL s_client. hosts1=$(printf "gemini://geminispace.info/known-hosts\r\n" \ - | timeout 5 openssl s_client -quiet -connect "geminispace.info:1965" 2>/dev/null \ + | timeout 20 openssl s_client -quiet -connect "geminispace.info:1965" 2>/dev/null \ | grep "gemini://" | cut -d ' ' -f 3) if [ -z "$hosts1" ]; then >&2 echo "geminispace.info/known-hosts download failed." exit 1 fi hosts2=$(printf "gemini://gemini.bortzmeyer.org/software/lupa/lupa-capsules.txt\r\n" \ - | timeout 5 openssl s_client -quiet -connect "gemini.bortzmeyer.org:1965" 2>/dev/null \ + | timeout 20 openssl s_client -quiet -connect "gemini.bortzmeyer.org:1965" 2>/dev/null \ | tail -n +2) if [ -z "$hosts2" ]; then >&2 echo "lupa-capsules.txt download failed."