quic_blacklist.go 712 B

123456789101112131415161718192021222324
  1. package sniff
  2. import (
  3. "crypto/tls"
  4. "github.com/sagernet/sing-box/common/ja3"
  5. )
  6. // Chromium sends separate client hello packets, but UQUIC has not yet implemented this behavior
  7. // The cronet without this behavior does not have version 115
  8. var uQUICChrome115 = &ja3.ClientHello{
  9. Version: tls.VersionTLS12,
  10. CipherSuites: []uint16{4865, 4866, 4867},
  11. Extensions: []uint16{0, 10, 13, 16, 27, 43, 45, 51, 57, 17513},
  12. EllipticCurves: []uint16{29, 23, 24},
  13. SignatureAlgorithms: []uint16{1027, 2052, 1025, 1283, 2053, 1281, 2054, 1537, 513},
  14. }
  15. func maybeUQUIC(fingerprint *ja3.ClientHello) bool {
  16. if uQUICChrome115.Equals(fingerprint, true) {
  17. return true
  18. }
  19. return false
  20. }