1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Encryption?

Discussion in 'Development' started by BruhLol, Apr 8, 2019.

  1. BruhLol

    BruhLol Baby Zombie

    Messages:
    122
    So i heard about encryption today, proxy players cant join if theres encryption? does anyone know hows that possible? how to implement it?
     
  2. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Technically not true, but encryption does make the job of a hacker proxy much more complex.
     
  3. BruhLol

    BruhLol Baby Zombie

    Messages:
    122
    is it a feature in pmmp?
     
  4. Emirhan Akpınar

    Emirhan Akpınar Slime

    Messages:
    90
    Do you want prevent proxy players?
     
  5. BruhLol

    BruhLol Baby Zombie

    Messages:
    122
    yes
     
  6. Emirhan Akpınar

    Emirhan Akpınar Slime

    Messages:
    90
    PHP:
    public function onClientPacket(DataPacketReceiveEvent $event) {
            
    $ipList = [Server::getInstance()->getIp(), Internet::getIP(), "127.0.0.1""localhost""0.0.0.0"];
            
    $packet $event->getPacket();
            
    $player $event->getPlayer();
            if(
    $packet instanceof LoginPacket){
                if(!
    in_array($packet->serverAddress$ipList)){
                    
    $player->kick("Proxy detected.");
                    
    $event->setCancelled();
                }
            }
        }
     
  7. Emirhan Akpınar

    Emirhan Akpınar Slime

    Messages:
    90
    Can you try this?
     
  8. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Will this only work if we know whay ip they're coming from?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.