Improved error message for invalid protocol in adlist download

Signed-off-by: Sebastian Dinator <sdinator@alumnos.uai.cl>
Signed-off-by: Sebastián Dinator <sdinator@alumnos.uai.cl>
This commit is contained in:
Sebastian Dinator 2024-10-24 02:05:13 -03:00 committed by Sebastián Dinator
parent 1a4870690b
commit 0e7706ffa3
No known key found for this signature in database
GPG key ID: DB6EB598ED21240D

View file

@ -598,7 +598,9 @@ gravity_DownloadBlocklistFromUrl() {
# Check for allowed protocols
if [[ $url != "http"* && $url != "https"* && $url != "file"* && $url != "ftp"* && $url != "ftps"* && $url != "sftp"* ]]; then
echo -e "${OVER} ${CROSS} ${str} Invalid protocol specified, ignoring list"
echo -e "${OVER} ${CROSS} ${str} Invalid protocol specified. Ignoring list."
echo -e " Ensure your URL starts with a valid protocol like http:// or https:// ."
echo -e " E.g., try http://localhost/adblock.txt instead of localhost/adblock.txt."
download=false
fi