export https_proxy=http://127.0.0.1:6152;export http_proxy=http://127.0.0.1:6152
contains() {
    string="$1"
    substring="$2"
    if test "${string#*$substring}" != "$string"
    then
        return 0    # $substring is in $string
    else
        return 1    # $substring is not in $string
    fi
}

while true; do
    result=$(curl 'https://www.google.com/voice/b/0/service/post' -H 'origin: https://www.google.com' -H 'accept-encoding: gzip, )
    echo "$result"
    contains "$result" "error" || exit 0
    sleep 1.5
done

请自行替换curl内容