Reputation: 41
I want check whether an incoming HTTP request is coming from a Transparent proxy, Misleading proxy, SOCKS Proxy using PHP code.I had developed one application in PHP.
I had checked the client using proxy or not from $_SERVER
Request.I helped blow link for this
Detecting whether a user is behind aproxy
Upvotes: 0
Views: 1197
Reputation: 287825
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
.
Upvotes: 2