xd
This commit is contained in:
parent
8e1ac1a3f8
commit
02ca048238
@ -409,14 +409,14 @@ var_dump(is_null($this->{$name}));
|
||||
$this->write($step1);
|
||||
break;
|
||||
case 'obfuscated2':
|
||||
$message = "\0\0\0\0\0\0\0\0".$message."\0\0\0\0";
|
||||
$message = $this->obfuscated['encryption']->encrypt("\0\0\0\0\0\0\0\0".$message."\0\0\0\0");
|
||||
$len = strlen($message) / 4;
|
||||
if ($len < 127) {
|
||||
$step1 = chr($len).$message;
|
||||
} else {
|
||||
$step1 = chr(127).substr(pack('V', $len), 0, 3).$message;
|
||||
}
|
||||
$this->write($this->obfuscated['encryption']->encrypt($step1));
|
||||
$this->write($step1);
|
||||
break;
|
||||
case 'http':
|
||||
case 'https':
|
||||
|
@ -89,8 +89,12 @@ var_dump(is_null($this->{$name}));
|
||||
}
|
||||
\danog\MadelineProto\Logger::log(['Connecting to DC '.$dc_number.' ('.$test.' server, '.$ipv6.', '.$this->settings[$dc_config_number]['protocol'].')...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
|
||||
$this->sockets[$dc_number] = new Connection($this->settings[$dc_config_number]['proxy'], $this->settings[$dc_config_number]['proxy_extra'], $address, $port, $this->settings[$dc_config_number]['protocol'], $this->settings[$dc_config_number]['timeout'], $this->settings[$dc_config_number]['ipv6']);
|
||||
|
||||
if (isset($this->sockets[$dc_number]->old)) {
|
||||
$this->sockets[$dc_number]->__construct($this->settings[$dc_config_number]['proxy'], $this->settings[$dc_config_number]['proxy_extra'], $address, $port, $this->settings[$dc_config_number]['protocol'], $this->settings[$dc_config_number]['timeout'], $this->settings[$dc_config_number]['ipv6']);
|
||||
unset($this->sockets[$dc_number]->old);
|
||||
} else {
|
||||
$this->sockets[$dc_number] = new Connection($this->settings[$dc_config_number]['proxy'], $this->settings[$dc_config_number]['proxy_extra'], $address, $port, $this->settings[$dc_config_number]['protocol'], $this->settings[$dc_config_number]['timeout'], $this->settings[$dc_config_number]['ipv6']);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user