1
0

dhcp_stub.go 672 B

1234567891011121314151617181920
  1. //go:build !with_dhcp
  2. package include
  3. import (
  4. "context"
  5. "github.com/sagernet/sing-box/adapter"
  6. C "github.com/sagernet/sing-box/constant"
  7. "github.com/sagernet/sing-box/dns"
  8. "github.com/sagernet/sing-box/log"
  9. "github.com/sagernet/sing-box/option"
  10. E "github.com/sagernet/sing/common/exceptions"
  11. )
  12. func registerDHCPTransport(registry *dns.TransportRegistry) {
  13. dns.RegisterTransport[option.DHCPDNSServerOptions](registry, C.DNSTypeDHCP, func(ctx context.Context, logger log.ContextLogger, tag string, options option.DHCPDNSServerOptions) (adapter.DNSTransport, error) {
  14. return nil, E.New(`DHCP is not included in this build, rebuild with -tags with_dhcp`)
  15. })
  16. }