github.com/sagernet/sing-box@v1.9.0-rc.20/include/quic_stub.go (about) 1 //go:build !with_quic 2 3 package include 4 5 import ( 6 "context" 7 8 "github.com/sagernet/sing-box/adapter" 9 "github.com/sagernet/sing-box/common/tls" 10 C "github.com/sagernet/sing-box/constant" 11 "github.com/sagernet/sing-box/option" 12 "github.com/sagernet/sing-box/transport/v2ray" 13 "github.com/sagernet/sing-dns" 14 M "github.com/sagernet/sing/common/metadata" 15 N "github.com/sagernet/sing/common/network" 16 ) 17 18 func init() { 19 dns.RegisterTransport([]string{"quic", "h3"}, func(options dns.TransportOptions) (dns.Transport, error) { 20 return nil, C.ErrQUICNotIncluded 21 }) 22 v2ray.RegisterQUICConstructor( 23 func(ctx context.Context, options option.V2RayQUICOptions, tlsConfig tls.ServerConfig, handler adapter.V2RayServerTransportHandler) (adapter.V2RayServerTransport, error) { 24 return nil, C.ErrQUICNotIncluded 25 }, 26 func(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, options option.V2RayQUICOptions, tlsConfig tls.Config) (adapter.V2RayClientTransport, error) { 27 return nil, C.ErrQUICNotIncluded 28 }, 29 ) 30 }