diff --git a/src/shoghicp/FastTransfer/StrangePacket.php b/src/shoghicp/FastTransfer/StrangePacket.php index 0674b4c..0ff5c39 100644 --- a/src/shoghicp/FastTransfer/StrangePacket.php +++ b/src/shoghicp/FastTransfer/StrangePacket.php @@ -32,7 +32,7 @@ protected function putAddress($addr, $port, $version = 4){ $this->putByte($version); if($version === 4){ foreach(explode(".", $addr) as $b){ - $this->putByte((~((int) $b)) & 0xff); + $this->putByte(~((int) $b)); } $this->putShort($port); }else{ @@ -49,4 +49,4 @@ public function encode(){ $this->putAddress($this->address, $this->port); } -} \ No newline at end of file +}