News for hackers. Stuff that matters.
Re:WARP is here by OJFord on Wednesday September 25, 2019 @12:53PM (#21072606)
Fast work indeed, the meat of it:

(registering a `wg` generated public key with CF)

    api=https://api.cloudflareclient.com/v0i1909051800
    ins() { vrb=$1; shift; curl -s -H 'user-agent:' -H 'content-type: application/json' -X "${vrb}" "${api}/$@"; }
    sec() { ins "$@" -H 'authorization: Bearer '"${reg[1]}"''; }

    cfg=($(if [[ -e "${usr}" ]]; then
        reg=($(cat "${usr}"))
        test "${#reg[@]}" -eq 2
        sec GET "reg/${reg[0]}"
    else
        reg=($(ins POST "reg" -d '{"install_id":"","tos":"'"$(date -u +%FT%T.000Z)"'","key":"'"${pub}"'","fcm_token":"","type":"ios","locale":"en_US"}' |
            jq -r '.result|.id+" "+.token'))
        test "${#reg[@]}" -eq 2
        echo "${reg[@]}" >"${usr}"
        sec PATCH "reg/${reg[0]}" -d '{"warp_enabled":true}'
    fi | jq -r '.result.config|(.peers[0]|.public_key+" "+.endpoint.v4)+" "+.interface.addresses.v4'))
    test "${#cfg[@]}" -eq 3
Re:WARP is here by cosmojg on Wednesday September 25, 2019 @07:21PM (#21076657)
Will this work on Linux?
Re:WARP is here by OJFord on Thursday September 26, 2019 @09:13AM (#21080592)
I can't see why that bit wouldn't, the rest of the script has some macOS-specific network setup though.