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.

sockopts_linux.go 560B

12345678910111213141516171819
  1. //go:build linux
  2. package network
  3. import (
  4. "syscall"
  5. "golang.org/x/sys/unix"
  6. )
  7. func setCongestionControl(conn syscall.RawConn) {
  8. conn.Control(func(fd uintptr) { //nolint: errcheck
  9. // BBR provides better throughput over lossy and high-latency links compared
  10. // to the default cubic, which is especially beneficial for mobile and
  11. // home internet clients. This is best-effort: silently ignored if the
  12. // kernel does not have tcp_bbr available.
  13. unix.SetsockoptString(int(fd), unix.IPPROTO_TCP, unix.TCP_CONGESTION, "bbr") //nolint: errcheck
  14. })
  15. }