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.

main.go 614B

12345678910111213141516171819202122232425262728
  1. package main
  2. import (
  3. "math/rand"
  4. "time"
  5. "github.com/alecthomas/kong"
  6. )
  7. var version = "dev" // has to be set by ldflags
  8. type CLI struct {
  9. GenerateSecret cliCommandGenerateSecret `cmd help:"Generate new proxy secret"` // nolint: govet
  10. Access cliCommandAccess `cmd help:"Print access information."` // nolint: govet
  11. Version kong.VersionFlag `help:"Print version."`
  12. }
  13. func main() {
  14. rand.Seed(time.Now().UTC().UnixNano())
  15. cli := &CLI{}
  16. ctx := kong.Parse(cli, kong.Vars{
  17. "domain_front": "amazonaws.com",
  18. "version": version,
  19. })
  20. ctx.FatalIfErrorf(ctx.Run(cli))
  21. }