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.

events.go 921B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package mtglib
  2. import (
  3. "net"
  4. "time"
  5. )
  6. type EventStart struct {
  7. CreatedAt time.Time
  8. ConnID string
  9. RemoteIP net.IP
  10. }
  11. func (e EventStart) StreamID() string {
  12. return e.ConnID
  13. }
  14. type EventConnectedToDC struct {
  15. CreatedAt time.Time
  16. ConnID string
  17. RemoteIP net.IP
  18. DC int
  19. }
  20. func (e EventConnectedToDC) StreamID() string {
  21. return e.ConnID
  22. }
  23. type EventTraffic struct {
  24. CreatedAt time.Time
  25. ConnID string
  26. Traffic uint
  27. IsRead bool
  28. }
  29. func (e EventTraffic) StreamID() string {
  30. return e.ConnID
  31. }
  32. type EventFinish struct {
  33. CreatedAt time.Time
  34. ConnID string
  35. }
  36. func (e EventFinish) StreamID() string {
  37. return e.ConnID
  38. }
  39. type EventConcurrencyLimited struct {
  40. CreatedAt time.Time
  41. }
  42. func (e EventConcurrencyLimited) StreamID() string {
  43. return ""
  44. }
  45. type EventIPBlocklisted struct {
  46. CreatedAt time.Time
  47. RemoteIP net.IP
  48. }
  49. func (e EventIPBlocklisted) StreamID() string {
  50. return ""
  51. }