Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.1 KiB

/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*
* Originally from:
* https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE
*/
import type {DcId} from '../types';
export const MAIN_DOMAINS = ['web.telegram.i2p', 're6cgwg2yrkgaixlqvt5ufajbb3w42fsldlq7k5brpvnd5gp6x5a.b32.i2p'];
export const DEFAULT_BACKGROUND_SLUG = 'pattern';
const threads = Math.min(4, navigator.hardwareConcurrency ?? 4);
const App = {
id: +process.env.API_ID,
hash: process.env.API_HASH,
version: process.env.VERSION,
versionFull: process.env.VERSION_FULL,
build: +process.env.BUILD,
langPackVersion: '1.6.6',
langPack: 'webk',
langPackCode: 'en',
domains: MAIN_DOMAINS,
baseDcId: 2 as DcId,
isMainDomain: MAIN_DOMAINS.includes(location.hostname),
suffix: 'K',
threads,
cryptoWorkers: threads
};
if(App.isMainDomain) { // use Webogram credentials then
App.id = 619296;
App.hash = '9461c49c28b238b90480371311149169';
}
export default App;