By definition, there is no way to distinguish a truly transparent proxy, so there is no way to block them. You could, in theory, try to identify the TCP/IP stack of the remote system and try to match that to the OS declared in the user-agent. However, this approach is erorr-prone, impractical, extremely complicated, and naturally cannot distinguish a "real" webbrowser from a proxy if both run on the same OS.
If you define a misleading proxy as one that alters the content, you can check the content with JavaScript. For example, if the proxy adds <img src="http://evil.com/ad">
to all requests, check document.querySelector('img[src="http://evil.com/ad"]').length > 0
.