Add DERP service

This commit is contained in:
世界 2025-03-29 17:24:34 +08:00
parent 85a8d8163f
commit 9e6de24f15
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
8 changed files with 643 additions and 1 deletions

View file

@ -7,6 +7,7 @@ import (
"github.com/sagernet/sing-box/adapter/endpoint"
"github.com/sagernet/sing-box/adapter/inbound"
"github.com/sagernet/sing-box/adapter/outbound"
"github.com/sagernet/sing-box/adapter/service"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/dns"
"github.com/sagernet/sing-box/dns/transport"
@ -118,6 +119,14 @@ func DNSTransportRegistry() *dns.TransportRegistry {
return registry
}
func ServiceRegistry() *service.Registry {
registry := service.NewRegistry()
registerDERPService(registry)
return registry
}
func ServiceRegistry() *service.Registry {
registry := service.NewRegistry()
return registry