mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 19:01:42 +02:00
test.
This commit is contained in:
parent
4f066d050a
commit
f402b41422
1 changed files with 8 additions and 4 deletions
12
config.go
12
config.go
|
@ -149,11 +149,15 @@ func parseCIDRNetIP(section *ini.Section, keyName string) ([]netip.Addr, error)
|
||||||
for _, str := range keys {
|
for _, str := range keys {
|
||||||
prefix, err := netip.ParsePrefix(str)
|
prefix, err := netip.ParsePrefix(str)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
addr, err := netip.ParseAddr(str)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
ips = append(ips, addr)
|
||||||
|
} else {
|
||||||
|
addr := prefix.Addr()
|
||||||
|
ips = append(ips, addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
addr := prefix.Addr()
|
|
||||||
ips = append(ips, addr)
|
|
||||||
}
|
}
|
||||||
return ips, nil
|
return ips, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue