To set your public IP it can be done via API, but as the IP has to be in the body of the request it cannot be done with a custom provider. This is a sample request: curl -X PUT \'https://api.cloudflare.com/client/v4/accounts/[account_id]/gateway/locations/[location_id]'\ -...
if CF API v4 is deprecated. It is currently new, so should be stable for many years. if api.ipify.org is deprecated. There are many others. Or usedigif you like. TO DO Convert curl from linux bash script to other platforms.