support multiple network interfaces

This commit is contained in:
ginuerzh
2022-03-01 21:48:50 +08:00
parent 07132d8de7
commit ffdf11e89e
44 changed files with 431 additions and 474 deletions

View File

@ -102,9 +102,7 @@ func NewExchanger(addr string, opts ...Option) (Exchanger, error) {
ex.addr = net.JoinHostPort(ex.addr, "53")
}
if ex.router == nil {
ex.router = &chain.Router{
Logger: options.logger,
}
ex.router = (&chain.Router{}).WithLogger(options.logger)
}
switch ex.network {