Skip to content

Commit

Permalink
fix: use ConnectionTCPObfuscated in browsers (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
rojvv authored Dec 2, 2022
1 parent 3975e68 commit ac4d6e1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/client/base_client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// deno-lint-ignore-file no-explicit-any
import { VERSION } from "../version.ts";
import { sleep } from "../helpers.ts";
import { Connection, ConnectionTCPFull } from "../network/mod.ts";
import {
Connection,
ConnectionTCPFull,
ConnectionTCPObfuscated,
} from "../network/mod.ts";
import { Session, StoreSession } from "../sessions/mod.ts";
import { Logger, LogLevel } from "../extensions/logger.ts";
import { PromisedNetSockets } from "../extensions/promised_net_sockets.ts";
Expand Down Expand Up @@ -56,7 +60,9 @@ export interface TelegramClientParams {
}

const clientParamsDefault = {
connection: ConnectionTCPFull, // ConnectionTCPObfuscated,
connection: typeof document === "undefined"
? ConnectionTCPFull
: ConnectionTCPObfuscated,
networkSocket: typeof document === "undefined"
? PromisedNetSockets
: PromisedWebSockets,
Expand Down

0 comments on commit ac4d6e1

Please sign in to comment.