As raised in MDL-46375, we should be using the Moodle CURL API for all downloads and streaming. This gives us the benefit of both Proxy server support and URL blacklisting/whitelisting.
Individual implementations may choose to switch back to standard file_get_contents and uses of readfile on a remote path if they are sure that they may do so in the target environment.