github.com/kelleygo/clashcore@v1.0.2/transport/tuic/tuic.go (about) 1 package tuic 2 3 import ( 4 C "github.com/kelleygo/clashcore/constant" 5 "github.com/kelleygo/clashcore/transport/tuic/common" 6 v4 "github.com/kelleygo/clashcore/transport/tuic/v4" 7 v5 "github.com/kelleygo/clashcore/transport/tuic/v5" 8 ) 9 10 type ClientOptionV4 = v4.ClientOption 11 type ClientOptionV5 = v5.ClientOption 12 13 type Client = common.Client 14 15 func NewClientV4(clientOption *ClientOptionV4, udp bool, dialerRef C.Dialer) Client { 16 return v4.NewClient(clientOption, udp, dialerRef) 17 } 18 19 func NewClientV5(clientOption *ClientOptionV5, udp bool, dialerRef C.Dialer) Client { 20 return v5.NewClient(clientOption, udp, dialerRef) 21 } 22 23 type DialFunc = common.DialFunc 24 25 var TooManyOpenStreams = common.TooManyOpenStreams 26 27 const DefaultStreamReceiveWindow = common.DefaultStreamReceiveWindow 28 const DefaultConnectionReceiveWindow = common.DefaultConnectionReceiveWindow 29 30 var GenTKN = v4.GenTKN 31 var PacketOverHeadV4 = v4.PacketOverHead 32 var PacketOverHeadV5 = v5.PacketOverHead 33 var MaxFragSizeV5 = v5.MaxFragSize 34 35 type UdpRelayMode = common.UdpRelayMode 36 37 const ( 38 QUIC = common.QUIC 39 NATIVE = common.NATIVE 40 )