Resource icon

Approved Proxy Checker 1.1

No permission to download
Hi,
I have this error with this plugin:
Code:
[IronPython] Error in plugin ProxyChecker:
Traceback (most recent call last):
File "<string>", line 12, in On_PlayerConnected
IndexError: index out of range: 1
 
That's because plugin cannot track player location and check for proxy. You can ignore that error , it will be fixed in next version which will be uploaded later today.
 
Soon i'll switch to GeoIP module and there'd be no more errors like i hope.
I recommend disabling it until i'll post an update.
 
Soon i'll switch to GeoIP module and there'd be no more errors like i hope.
I recommend disabling it until i'll post an update.
GeoIP lite cant tell if Its a proxy. The url that ur requesting changes sometimes. I will post a method that is able to counter that in the morning.
 
BogdanWDK submitted a new resource:

Proxy Checker - Check player on connect if he's using proxy and take actions on him.



Read more about this resource...
Use this.

Python:
import clr
clr.AddReferenceByPartialName("Fougerite")
import sys
import Fougerite
import re


class ProxyChecker:
   
    def On_PlayerConnected(self, Player):
        try:
            Message = str(Web.GET("http://iphub.info/api.php?ip=" + Player.IP + "&showtype=4"))
            Message = re.findall(r'(?:"proxy":).*', Message)
            Message = re.sub("[\}\"]", "", Message[0])
            isusingproxy = int(Message.split(':')[1])
            if isusingproxy == 1:
                Player.Message("You're using PROXY/VPN/NOLOGIN")
                Player.Message("In order to play here you must not use any Proxy/VPN/Nologin")
                # Player.Message(str(isusingproxy))
                Player.Disconnect()
            else:
                Player.Message("ProxyChecker cannot detect any proxy usage.")
        except:
            pass
 
When the IPHUB.info API is down this causes serious lags for your server. This happened for me now the 2-3rd time. I think the only way to fix that is running it on a separate thread and lowering the Web.get timeout.
 
When the IPHUB.info API is down this causes serious lags for your server. This happened for me now the 2-3rd time. I think the only way to fix that is running it on a separate thread and lowering the Web.get timeout.
Yes, with Fougerite 1.4.6B2

Python:
__author__ = 'BogdanWDK'
__version__ = '1.0'

import clr
clr.AddReferenceByPartialName("Fougerite")
import Fougerite
import re
import sys


class ProxyChecker:

    def DefaultSample(self, Player):
        try:
            Message = str(Web.GET("http://iphub.info/api.php?ip=" + Player.IP + "&showtype=4"))
            Message = re.findall(r'(?:"proxy":).*', Message)
            Message = re.sub("[\}\"]", "", Message[0])
            isusingproxy = int(Message.split(':')[1])
            if isusingproxy == 1:
                Player.Message("You're using PROXY/VPN/NOLOGIN")
                Player.Message("In order to play here you must not use any Proxy/VPN/Nologin")
                Player.Disconnect()
            else:
                Player.Message("ProxyChecker cannot detect any proxy usage.")
        except:
            pass
  
    def On_PlayerConnected(self, Player):
        Loom.ExecuteInBiggerStackThread(lambda:
            self.DefaultSample(Player)
        )
 
The latest version of Dretax works. I didn't check yet if the lag disappear. But since it is run in a thread there shouldn't be any lags.
 
It doesn't really run in a thread.

The server still produces

"Unresponsive for xxx seconds" errors and freezes when there is a problem with the iphub.info API.
 
I looked through all of my plugins to see why my server was lagging.

I left out the threading, since this plugin is causing lagg spikes.

This solves it.

Python:
import clr
clr.AddReferenceByPartialName("Fougerite")
import sys
import Fougerite


class ProxyChecker:
 
    def On_PlayerConnected(self, Player):
        Loom.ExecuteInBiggerStackThread(lambda:
            self.ProcessPlayer(Player)
        )
     
    def ProcessPlayer(self, Player):
        try:
            Message = str(Web.GET("http://iphub.info/api.php?ip=" + Player.IP + "&showtype=4"))
            Message = Message.replace('"', '').split(",")
            isusingproxy = Message[5]
            isusingproxy = int(isusingproxy.split(":")[1].replace("}", ""))
            if isusingproxy == 1:
                Player.Message("You're using PROXY/VPN/NOLOGIN")
                Player.Message("In order to play here you must not use any Proxy/VPN/Nologin")
                Player.Disconnect()
        except:
            pass
 
Last edited:
yea same don't work it doesn't kick players off for using vpn/proxy i hope they update it
 
yea same don't work it doesn't kick players off for using vpn/proxy i hope they update it
its not working anymore becaus the webAPI that the plugin uses got removed ;(
There still are some website around but you have to pay a license