fix: dhcp not working on windows

This commit is contained in:
wwqgtxx
2023-10-26 10:27:38 +08:00
parent cf93f69f40
commit 4314b37d04
6 changed files with 83 additions and 47 deletions

View File

@@ -20,6 +20,7 @@ type NetDialer interface {
type option struct {
interfaceName string
fallbackBind bool
addrReuse bool
routingMark int
network int
@@ -38,6 +39,12 @@ func WithInterface(name string) Option {
}
}
func WithFallbackBind(fallback bool) Option {
return func(opt *option) {
opt.fallbackBind = fallback
}
}
func WithAddrReuse(reuse bool) Option {
return func(opt *option) {
opt.addrReuse = reuse