See How to use raw data from ConfiDoc to understand the basics of proxies
But there is more to it. You can include resources from your external services "as local resources" using the proxy.
There is a special parameter "resource" which allows you to do that
http://YOUR_SERVER/confluence/plugins/servlet/confidoc/fetcher?serviceId=cd4a5707-c3f0-4fce-b67f-4126d6a74ab1&resource=http://yourexternalserver/some/path/image.png
serviceId here must be actually the service ID for your "yourexternalserver" server
Very important security concern: Make sure you understand that when you have such proxy enabled you are actually exposing the whole external service content to be accessible through it.
Consider enabling permissions for such configurations!