quic.go 617 B

123456789101112131415161718192021222324252627
  1. // +build !confonly
  2. package quic
  3. import (
  4. "github.com/v2fly/v2ray-core/v4/common"
  5. "github.com/v2fly/v2ray-core/v4/transport/internet"
  6. )
  7. //go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
  8. // Here is some modification needs to be done before update quic vendor.
  9. // * use bytespool in buffer_pool.go
  10. // * set MaxReceivePacketSize to 1452 - 32 (16 bytes auth, 16 bytes head)
  11. //
  12. //
  13. const (
  14. protocolName = "quic"
  15. internalDomain = "quic.internal.v2fly.org"
  16. )
  17. func init() {
  18. common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} {
  19. return new(Config)
  20. }))
  21. }