Fix Web Token login (#2136)
This commit is contained in:
parent
47eac1b33f
commit
966e6f7f37
@ -26,8 +26,6 @@ const { updateTwoFaSettings, getTmpPassword } = require('./2fa');
|
||||
|
||||
const DEFAULT_DC_ID = 2;
|
||||
const WEBDOCUMENT_DC_ID = 4;
|
||||
const DEFAULT_IPV4_IP = 'zws2.web.telegram.org';
|
||||
const DEFAULT_IPV6_IP = '[2001:67c:4e8:f002::a]';
|
||||
const EXPORTED_SENDER_RECONNECT_TIMEOUT = 1000; // 1 sec
|
||||
const EXPORTED_SENDER_RELEASE_TIMEOUT = 30000; // 30 sec
|
||||
const WEBDOCUMENT_REQUEST_PART_SIZE = 131072; // 128kb
|
||||
@ -223,8 +221,9 @@ class TelegramClient {
|
||||
await this.session.load();
|
||||
|
||||
if (!this.session.serverAddress || (this.session.serverAddress.includes(':') !== this._useIPV6)) {
|
||||
this.session.setDC(this.defaultDcId, this._useIPV6
|
||||
? DEFAULT_IPV6_IP : DEFAULT_IPV4_IP, this._args.useWSS ? 443 : 80);
|
||||
const DC = utils.getDC(this.defaultDcId);
|
||||
// TODO Fill IP addresses for when `this._useIPV6` is used
|
||||
this.session.setDC(this.defaultDcId, DC.ipAddress, this._args.useWSS ? 443 : 80);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user