I2P changes
Signed-off-by: r4sas <r4sas@i2pmail.org>
This commit is contained in:
parent
1fd19121c0
commit
703606f3a4
@ -194,27 +194,6 @@ export class AppSidebarLeft extends SidebarSlider {
|
||||
a.remove();
|
||||
}, 0);
|
||||
}
|
||||
}, {
|
||||
icon: 'char z',
|
||||
text: 'ChatList.Menu.SwitchTo.Z',
|
||||
onClick: () => {
|
||||
Promise.all([
|
||||
sessionStorage.set({kz_version: 'Z'}),
|
||||
sessionStorage.delete('tgme_sync')
|
||||
]).then(() => {
|
||||
location.href = 'https://web.telegram.org/z/';
|
||||
});
|
||||
},
|
||||
verify: () => App.isMainDomain
|
||||
}, {
|
||||
icon: 'char w',
|
||||
text: 'ChatList.Menu.SwitchTo.Webogram',
|
||||
onClick: () => {
|
||||
sessionStorage.delete('tgme_sync').then(() => {
|
||||
location.href = 'https://web.telegram.org/?legacy=1';
|
||||
});
|
||||
},
|
||||
verify: () => App.isMainDomain
|
||||
}];
|
||||
|
||||
const filteredButtons = menuButtons.filter(Boolean);
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
import type {DcId} from '../types';
|
||||
|
||||
export const MAIN_DOMAIN = 'web.telegram.org';
|
||||
export const MAIN_DOMAIN = 'web.telegram.i2p';
|
||||
|
||||
const App = {
|
||||
id: +process.env.API_ID,
|
||||
@ -30,8 +30,8 @@ const App = {
|
||||
};
|
||||
|
||||
if(App.isMainDomain) { // use Webogram credentials then
|
||||
App.id = 2496;
|
||||
App.hash = '8da85b0d5bfe62527e5b244c209159c3';
|
||||
App.id = 619296;
|
||||
App.hash = '9461c49c28b238b90480371311149169';
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
@ -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 {
|
||||
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) {
|
||||
|
@ -43,8 +43,8 @@ export class TelegramMeWebManager {
|
||||
|
||||
const path = `_websync_?authed=${canRedirect ? '1' : '0'}&version=${encodeURIComponent(App.version + ' ' + App.suffix)}`;
|
||||
const urls = [
|
||||
'//telegram.me/' + path,
|
||||
'//t.me/' + path
|
||||
'//web.telegram.i2p/telegram-me/' + path,
|
||||
'//web.telegram.i2p/t-me/' + path,
|
||||
];
|
||||
|
||||
const promises = urls.map((url) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user