curl: (56) CONNECT tunnel failed, response 407
The gateway rejected the credentials. Copy the token again from the dashboard, check there is no space around the colon in -U, and make sure the username starts with your proxy user. If you put credentials in the URL, percent-encode special characters or move them to -U.