Bitcoin Forum
May 28, 2024, 04:43:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Block Tough Proxies and vps with PHP  (Read 174 times)
fakepro (OP)
Newbie
*
Offline Offline

Activity: 81
Merit: 0


View Profile WWW
December 20, 2018, 08:51:26 AM
 #1

Block Tough Proxies with PHP
To stop tough proxy visits from sites like hidemyass.com, add the following slice of finely crafted PHP to the top of your
header.php
 file:
<?php if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1))
die("Proxy access not allowed"); ?>
after my search for get bst way to prevent traffic come from proxy

i found this and i tested it ,so it is effective
for all faucet owners

source for more info
Kema
Full Member
***
Offline Offline

Activity: 630
Merit: 100



View Profile WWW
December 23, 2018, 03:23:56 PM
 #2

You run a pretty substantial risk of seeing a lot of false positives with that particular code snippet.
After having been actively working on this for a long time, I think it’s safe to say there’s no easy bulletproof fix.
I have addressed this problem with my new upcoming faucet service. It’ll be 100% free and you’ll be able to screen for several different things, proxies is only one of the variables. Any faucet script should be able to use it but the exact implementation will naturally differ with each individual case. No worries though, it’ll be super easy, almost plug and pray. Release schedule, sometime this January. Grin
(Once I have my new faucets scripts available for the public, it will really be plug and pray.)

Don't just short links, ezLink them!
BTCUserHere
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
December 23, 2018, 07:48:44 PM
 #3

Actually I think that's will not work properly

Many visitors will be blocked only.
fufufuwu
Jr. Member
*
Offline Offline

Activity: 319
Merit: 2


View Profile
December 23, 2018, 08:21:49 PM
 #4

I see the script has good intentions, but blocking off every traffic that has port 80 opened is not a good way to block proxies, as you will effectively block everyone that hosts a web server on their PC (actually a lot of devs tend to do that) and also it can harm good bots like Google or other search engines, blocking you off additional traffic from there. :/

In my opinion a better way for detecting proxies would be making a "trust score". Lets say that detecting the port 80 opened would lower the trust score, but not too much to block the visit yet. Then you can combine other ways of detecting proxy traffic (like nastyhosts or other API), and the traffic with lowest trust score would be blocked from accessing the website. That's my idea Grin
Kema
Full Member
***
Offline Offline

Activity: 630
Merit: 100



View Profile WWW
December 24, 2018, 05:54:27 AM
 #5

As I said, a lot of false positives...
I have played around with this particular piece of code in the past and a lot of “innocent” visitors got blocked.
So, I moved on to better solutions. Grin

Fufufuwu’s idea of a trust score is how the big boys rock it, but that’s pretty advanced stuff to set up yourself and nothing I’d do unless I really knew what I was doing. Behavioral analysis and predictive probabilities aren’t trivial...

Don't just short links, ezLink them!
tungaqhd
Hero Member
*****
Offline Offline

Activity: 1540
Merit: 508


View Profile
December 24, 2018, 08:16:27 AM
 #6

Good idea but i think that it will work like nastyhost which ban half of the universe  Grin Grin Grin
Kema
Full Member
***
Offline Offline

Activity: 630
Merit: 100



View Profile WWW
December 24, 2018, 03:22:28 PM
 #7

Good idea but i think that it will work like nastyhost which ban half of the universe  Grin Grin Grin
Is nastyhost that troublesome?
I’ve only tried their API very briefly and didn’t really read up on them.

Don't just short links, ezLink them!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!