quic.go 638 B

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