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.

stream_info.go 483B

12345678910111213141516171819202122232425262728
  1. package stats
  2. import statsd "github.com/smira/go-statsd"
  3. type streamInfo struct {
  4. isDomainFronted bool
  5. tags map[string]string
  6. }
  7. func (s streamInfo) T(key string) statsd.Tag {
  8. return statsd.StringTag(key, s.tags[key])
  9. }
  10. func (s *streamInfo) Reset() {
  11. s.isDomainFronted = false
  12. for k := range s.tags {
  13. delete(s.tags, k)
  14. }
  15. }
  16. func getDirection(isRead bool) string {
  17. if isRead { // for telegram
  18. return TagDirectionToClient
  19. }
  20. return TagDirectionFromClient
  21. }