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
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

init.go 312B

123456789101112131415161718192021222324
  1. package hub
  2. import (
  3. "context"
  4. "errors"
  5. "sync"
  6. )
  7. var (
  8. ErrTimeout = errors.New("timeout")
  9. ErrClosed = errors.New("context is closed")
  10. Hub Interface
  11. initOnce sync.Once
  12. )
  13. func Init(ctx context.Context) {
  14. initOnce.Do(func() {
  15. Hub = &hub{
  16. muxes: make(map[int32]*mux),
  17. ctx: ctx,
  18. }
  19. })
  20. }