Proxy fixes
This commit is contained in:
parent
38a76c925e
commit
de26dc37ab
@ -73,8 +73,7 @@ class Connection
|
||||
$this->port = $port;
|
||||
$this->proxy = $proxy;
|
||||
$this->extra = $extra;
|
||||
|
||||
if (($has_proxy = $proxy !== '\Socket') && !isset(class_implements($proxy)['\danog\MadelineProto\Proxy'])) {
|
||||
if (($has_proxy = $proxy !== '\Socket') && !isset(class_implements($proxy)['danog\MadelineProto\Proxy'])) {
|
||||
throw new \danog\MadelineProto\Exception(\danog\MadelineProto\Lang::$current_lang['proxy_class_invalid']);
|
||||
}
|
||||
switch ($this->protocol) {
|
||||
|
@ -607,7 +607,7 @@ class MTProto
|
||||
}
|
||||
|
||||
if ($settings['app_info']['api_id'] < 20) {
|
||||
// $settings['connection_settings']['all']['protocol'] = 'obfuscated2';
|
||||
$settings['connection_settings']['all']['protocol'] = 'obfuscated2';
|
||||
}
|
||||
switch ($settings['logger']['logger_level']) {
|
||||
case 'ULTRA_VERBOSE': $settings['logger']['logger_level'] = 5; break;
|
||||
|
@ -14,6 +14,7 @@ set_include_path(get_include_path().':'.realpath(dirname(__FILE__).'/../').':'.r
|
||||
chdir(dirname(__FILE__).'/../');
|
||||
require_once 'vendor/autoload.php';
|
||||
|
||||
|
||||
if (!function_exists('readline')) {
|
||||
function readline($prompt = null)
|
||||
{
|
||||
@ -50,6 +51,8 @@ if (getenv('TEST_SECRET_CHAT') == '') {
|
||||
}
|
||||
echo 'Loading settings...'.PHP_EOL;
|
||||
$settings = json_decode(getenv('MTPROTO_SETTINGS'), true) ?: [];
|
||||
//$settings['connection_settings']['all']['proxy'] = '\SocksProxy';
|
||||
//$settings['connection_settings']['all']['proxy_extra'] = ['address' => '190.83.240.10', 'port' => 20057];
|
||||
|
||||
var_dump($settings);
|
||||
if ($MadelineProto === false) {
|
||||
|
Loading…
Reference in New Issue
Block a user