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
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314
  1. package network
  2. import "net/http"
  3. type networkHTTPTransport struct {
  4. userAgent string
  5. next http.RoundTripper
  6. }
  7. func (n networkHTTPTransport) RoundTrip(req *http.Request) (*http.Response, error) {
  8. req.Header.Set("User-Agent", n.userAgent)
  9. return n.next.RoundTrip(req) //nolint: wrapcheck
  10. }