github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/include/dhcp_stub.go (about) 1 //go:build !with_dhcp 2 3 package include 4 5 import ( 6 "context" 7 8 "github.com/sagernet/sing-dns" 9 E "github.com/sagernet/sing/common/exceptions" 10 "github.com/sagernet/sing/common/logger" 11 N "github.com/sagernet/sing/common/network" 12 ) 13 14 func init() { 15 dns.RegisterTransport([]string{"dhcp"}, func(name string, ctx context.Context, logger logger.ContextLogger, dialer N.Dialer, link string) (dns.Transport, error) { 16 return nil, E.New(`DHCP is not included in this build, rebuild with -tags with_dhcp`) 17 }) 18 }