custom domains only support CNAMEs not direct proxying (BB-8377)
I have a proxy which allows me to directly connect to bitbucket.org rather than through CNAME redirection.
I suggest that there should be a "waive rights to complain" mode where you just honour the HOST header wrt the associated repo.
The main motivation for this is to not require a subdomain, e.g. mydomain.com points to a proxy(notably because the proxy and the DNS server need to be co-located) rather than some spurious extra www or suchlike. So mydomain.com would internally map to myuser.bitbucket.org