Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
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.

cli_generate_secret.go 271B

1234567891011121314151617
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/9seconds/mtg/v2/mtglib"
  5. )
  6. func runGenerateSecret(cli *CLI) {
  7. secret := mtglib.GenerateSecret(cli.GenerateSecret.HostName)
  8. if cli.GenerateSecret.Hex {
  9. fmt.Println(secret.EE())
  10. } else {
  11. fmt.Println(secret.Base64())
  12. }
  13. }