Migrate bad options to library

This commit is contained in:
世界
2024-11-07 21:44:04 +08:00
parent 85f634d0cb
commit 1a230bda5d
58 changed files with 579 additions and 877 deletions

View File

@@ -239,9 +239,9 @@ func NewRouter(
}
var clientSubnet netip.Prefix
if server.ClientSubnet != nil {
clientSubnet = server.ClientSubnet.Build()
clientSubnet = netip.Prefix(common.PtrValueOrDefault(server.ClientSubnet))
} else if dnsOptions.ClientSubnet != nil {
clientSubnet = dnsOptions.ClientSubnet.Build()
clientSubnet = netip.Prefix(common.PtrValueOrDefault(dnsOptions.ClientSubnet))
}
if serverProtocol == "" {
serverProtocol = "transport"