Accessing files from a local cdn
I use Storage API for this sort of thing with S3 and cloudfront. I think it supports custom sub domains. It handles all the replication (copying,moving, deleting) itself. I have had a couple of minor compatibility issues with other contrib modules during upgrades. 

https://www.drupal.org/project/storage_api