Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal download test using CURL #393

Open
stephen-soltesz opened this issue Aug 22, 2023 · 0 comments
Open

Minimal download test using CURL #393

stephen-soltesz opened this issue Aug 22, 2023 · 0 comments

Comments

@stephen-soltesz
Copy link
Contributor

stephen-soltesz commented Aug 22, 2023

read MACHINE SERVER_URL <<< $( \
    curl --silent https://locate.measurementlab.net/v2/nearest/ndt/ndt7 \
      | jq -r '.results[0].machine,.results[0].urls."wss:///ndt/v7/download"' ) 
                                                                                
# Fix url for curl.                                                             
SERVER_URL=${SERVER_URL/wss/https}                                              
                                                                                
echo "NDT Download to $MACHINE"
curl --no-buffer \
    --max-time 12 \
    --header "Sec-WebSocket-Protocol: net.measurementlab.ndt.v7" \
    --header "Connection: Upgrade" \
    --header "Upgrade: websocket" \
    --header "Host: ndt-$MACHINE" \
    --header "Origin: https://ndt-$MACHINE" \
    --header "Sec-WebSocket-Version: 13" \
    --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
    ${SERVER_URL} > /dev/null || : # ignore timeouts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant