github.com/xraypb/Xray-core@v1.8.1/transport/internet/quic/quic.go (about)

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