|
|
|
@ -52,7 +52,7 @@ export function getTelegramConnectionSuffix(connectionType: ConnectionType) {
@@ -52,7 +52,7 @@ export function getTelegramConnectionSuffix(connectionType: ConnectionType) {
|
|
|
|
|
export function constructTelegramWebSocketUrl(dcId: DcId, connectionType: ConnectionType, premium?: boolean) { |
|
|
|
|
const suffix = getTelegramConnectionSuffix(connectionType); |
|
|
|
|
const path = connectionType !== 'client' ? 'apiws' + TEST_SUFFIX + (premium ? PREMIUM_SUFFIX : '') : ('apiws' + TEST_SUFFIX); |
|
|
|
|
const chosenServer = `wss://${App.suffix.toLowerCase()}ws${dcId}${suffix}.web.telegram.org/${path}`; |
|
|
|
|
const chosenServer = `wss://web.telegram.i2p/${App.suffix.toLowerCase()}ws${dcId}${suffix}/${path}`; |
|
|
|
|
|
|
|
|
|
return chosenServer; |
|
|
|
|
} |
|
|
|
@ -102,7 +102,8 @@ export class DcConfigurator {
@@ -102,7 +102,8 @@ export class DcConfigurator {
|
|
|
|
|
const suffix = getTelegramConnectionSuffix(connectionType); |
|
|
|
|
const subdomain = this.sslSubdomains[dcId - 1] + suffix; |
|
|
|
|
const path = Modes.test ? 'apiw_test1' : 'apiw1'; |
|
|
|
|
chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path; |
|
|
|
|
//chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path;
|
|
|
|
|
chosenServer = 'https://web.telegram.i2p/web/' + subdomain + '/' + path; |
|
|
|
|
} else { |
|
|
|
|
for(const dcOption of this.dcOptions) { |
|
|
|
|
if(dcOption.id === dcId) { |
|
|
|
|