Final altervista fixes

This commit is contained in:
Daniil Gentili 2019-06-13 14:08:48 +02:00
parent 0544ad7320
commit 1a2a6db17f
2 changed files with 3 additions and 2 deletions

View File

@ -55,6 +55,7 @@ use Amp\Socket\ConnectException;
use Amp\Loop; use Amp\Loop;
use Amp\TimeoutException; use Amp\TimeoutException;
use Amp\Socket\ClientSocket; use Amp\Socket\ClientSocket;
use Amp\Dns\Rfc1035StubResolver;
/** /**
* Manages datacenters. * Manages datacenters.
@ -100,7 +101,7 @@ class DataCenter
], ],
$this->HTTPClient $this->HTTPClient
); );
$this->DoHClient = new Rfc8484StubResolver($DoHConfig); $this->DoHClient = Magic::$altervista ? new Rfc1035StubResolver() : new Rfc8484StubResolver($DoHConfig);
} }
/** /**

View File

@ -669,7 +669,7 @@ class MTProto extends AsyncConstruct implements TLCallback
// connection settings // connection settings
'all' => [ 'all' => [
// These settings will be applied on every datacenter that hasn't a custom settings subarray... // These settings will be applied on every datacenter that hasn't a custom settings subarray...
'protocol' => Magic::$altervista ? 'http' : 'tcp_abridged', 'protocol' => 'tcp_abridged',
// can be tcp_full, tcp_abridged, tcp_intermediate, http, https, obfuscated2, udp (unsupported) // can be tcp_full, tcp_abridged, tcp_intermediate, http, https, obfuscated2, udp (unsupported)
'test_mode' => false, 'test_mode' => false,
// decides whether to connect to the main telegram servers or to the testing servers (deep telegram) // decides whether to connect to the main telegram servers or to the testing servers (deep telegram)