dhcp_stub.go 341 B

1234567891011121314
  1. //go:build !with_dhcp
  2. package include
  3. import (
  4. "github.com/sagernet/sing-dns"
  5. E "github.com/sagernet/sing/common/exceptions"
  6. )
  7. func init() {
  8. dns.RegisterTransport([]string{"dhcp"}, func(options dns.TransportOptions) (dns.Transport, error) {
  9. return nil, E.New(`DHCP is not included in this build, rebuild with -tags with_dhcp`)
  10. })
  11. }