There are a couple headers you can use to detect HTTP and SOCKS 4/5 proxies(the non-"elite" ones). VPN subsets, VPS, and stealth proxies require scraping and building IP blacklists and optionally detecting region changes using a region-subnet cached DB..
It's about 20 lines of PHP including the PDO DB code..
I tried this code
$proxy_headers = array(
'HTTP_VIA',
'HTTP_X_FORWARDED_FOR',
'HTTP_FORWARDED_FOR',
'HTTP_X_FORWARDED',
'HTTP_FORWARDED',
'HTTP_CLIENT_IP',
'HTTP_FORWARDED_FOR_IP',
'VIA',
'X_FORWARDED_FOR',
'FORWARDED_FOR',
'X_FORWARDED',
'FORWARDED',
'CLIENT_IP',
'FORWARDED_FOR_IP',
'HTTP_PROXY_CONNECTION'
);
foreach($proxy_headers as $x){
if (isset($_SERVER[$x])) { die("You are using a proxy!");}
}
// M
?>
But it said my real ip as proxy
The above code is really effective, but sometime blocks non-proxy users also (but about 90% accurate)
There are paid options like getip intel, very good service
https://getipintel.net/https://github.com/blackdotsh/getIPIntelIf you are using FaucetBox script, then nastyhosts is there, in my opinion they are one of the best because when my faucet got drained in just a few minutes I used it. I had to use it manually, but blocked 99% of proxy or bad ip's through htaccess.
I had done it manually, just catch a bad IP, check it with
http://v1.nastyhosts.com/IPand then use ASN blocklist to block the whole bad IP range
https://www.enjen.net/asn-blocklist/index.phphttps://bitcointalksearch.org/topic/m.16902102So far my collection of bad IP's
http://pastebin.com/k9eMLy9dAlso check your analytics data and block spam referral traffic
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} example\.com [NC]
RewriteRule .* - [F]
Hope it is helpful