2023-02-08 16:28:52 +08:00
|
|
|
//go:build !with_dhcp
|
|
|
|
|
|
|
|
package include
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/sagernet/sing-dns"
|
|
|
|
E "github.com/sagernet/sing/common/exceptions"
|
|
|
|
"github.com/sagernet/sing/common/logger"
|
|
|
|
N "github.com/sagernet/sing/common/network"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2023-04-08 08:58:01 +08:00
|
|
|
dns.RegisterTransport([]string{"dhcp"}, func(name string, ctx context.Context, logger logger.ContextLogger, dialer N.Dialer, link string) (dns.Transport, error) {
|
2023-02-08 16:28:52 +08:00
|
|
|
return nil, E.New(`DHCP is not included in this build, rebuild with -tags with_dhcp`)
|
|
|
|
})
|
|
|
|
}
|