1
0

quic.go 961 B

1234567891011121314151617181920212223242526272829303132
  1. //go:build with_quic
  2. package include
  3. import (
  4. "github.com/sagernet/sing-box/adapter/inbound"
  5. "github.com/sagernet/sing-box/adapter/outbound"
  6. "github.com/sagernet/sing-box/dns"
  7. "github.com/sagernet/sing-box/dns/transport/quic"
  8. "github.com/sagernet/sing-box/protocol/hysteria"
  9. "github.com/sagernet/sing-box/protocol/hysteria2"
  10. _ "github.com/sagernet/sing-box/protocol/naive/quic"
  11. "github.com/sagernet/sing-box/protocol/tuic"
  12. _ "github.com/sagernet/sing-box/transport/v2rayquic"
  13. )
  14. func registerQUICInbounds(registry *inbound.Registry) {
  15. hysteria.RegisterInbound(registry)
  16. tuic.RegisterInbound(registry)
  17. hysteria2.RegisterInbound(registry)
  18. }
  19. func registerQUICOutbounds(registry *outbound.Registry) {
  20. hysteria.RegisterOutbound(registry)
  21. tuic.RegisterOutbound(registry)
  22. hysteria2.RegisterOutbound(registry)
  23. }
  24. func registerQUICTransports(registry *dns.TransportRegistry) {
  25. quic.RegisterTransport(registry)
  26. quic.RegisterHTTP3Transport(registry)
  27. }