|
|
|
|
@ -1680,8 +1680,8 @@ check_quota(){ |
|
|
|
|
if [ "$CHECK_TYPE" = 1 ]; then |
|
|
|
|
QUOTA=$(grep -oP 'Quota: \K\d+' <<< $ACCOUNT) |
|
|
|
|
else |
|
|
|
|
ACCESS_TOKEN=$(grep 'access_token' /etc/wireguard/wgcf-account.toml | cut -d \" -f2) |
|
|
|
|
DEVICE_ID=$(grep 'device_id' /etc/wireguard/wgcf-account.toml | cut -d \" -f2) |
|
|
|
|
ACCESS_TOKEN=$(grep 'access_token' /etc/wireguard/wgcf-account.toml | cut -d \' -f2) |
|
|
|
|
DEVICE_ID=$(grep 'device_id' /etc/wireguard/wgcf-account.toml | cut -d \' -f2) |
|
|
|
|
API=$(curl -s "https://api.cloudflareclient.com/v0a884/reg/$DEVICE_ID" -H "User-Agent: okhttp/3.12.1" -H "Authorization: Bearer $ACCESS_TOKEN") |
|
|
|
|
QUOTA=$(grep -oP '"quota":\K\d+' <<< $API) |
|
|
|
|
fi |
|
|
|
|
|