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
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

main.go 672B

12345678910111213141516171819202122232425262728
  1. // mtg is just a command-line application that starts a proxy.
  2. //
  3. // Application logic is how to read a config and configure mtglib.Proxy.
  4. // So, probably you need to read the documentation for mtglib package
  5. // first.
  6. //
  7. // mtglib is a core of the application. The rest of the packages provide
  8. // some default implementations for the interfaces, defined in mtglib.
  9. package main
  10. import (
  11. "math/rand"
  12. "time"
  13. "github.com/9seconds/mtg/v2/internal/cli"
  14. "github.com/alecthomas/kong"
  15. )
  16. func main() {
  17. rand.Seed(time.Now().UTC().UnixNano())
  18. cli := &cli.CLI{}
  19. ctx := kong.Parse(cli, kong.Vars{
  20. "version": getVersion(),
  21. })
  22. ctx.FatalIfErrorf(ctx.Run(cli, version))
  23. }