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
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

interfaces.go 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package stats
  2. import (
  3. "net"
  4. "github.com/9seconds/mtg/conntypes"
  5. )
  6. type IngressTrafficInterface interface {
  7. IngressTraffic(int)
  8. }
  9. type EgressTrafficInterface interface {
  10. EgressTraffic(int)
  11. }
  12. type ClientConnectedInterface interface {
  13. ClientConnected(conntypes.ConnectionType, *net.TCPAddr)
  14. }
  15. type ClientDisconnectedInterface interface {
  16. ClientDisconnected(conntypes.ConnectionType, *net.TCPAddr)
  17. }
  18. type TelegramConnectedInterface interface {
  19. TelegramConnected(conntypes.DC, *net.TCPAddr)
  20. }
  21. type TelegramDisconnectedInterface interface {
  22. TelegramDisconnected(conntypes.DC, *net.TCPAddr)
  23. }
  24. type CrashInterface interface {
  25. Crash()
  26. }
  27. type ReplayDetectedInterface interface {
  28. ReplayDetected()
  29. }
  30. type AuthenticationFailedInterface interface {
  31. AuthenticationFailed()
  32. }
  33. type CloakedRequestInterface interface {
  34. CloakedRequest()
  35. }
  36. type Interface interface {
  37. IngressTrafficInterface
  38. EgressTrafficInterface
  39. ClientConnectedInterface
  40. ClientDisconnectedInterface
  41. TelegramConnectedInterface
  42. TelegramDisconnectedInterface
  43. CrashInterface
  44. ReplayDetectedInterface
  45. AuthenticationFailedInterface
  46. CloakedRequestInterface
  47. }