deb699c9
config: add global internal-ipnet setting
Add support for a general [sr.ht]internal-ipnet list of networks that can be considered OK for internal operations. The default is loopback addresses (127.0.0.0/8 and ::1/128) and private routable unicast addresses (192.168.0.0/16, 10.0.0.0/8 and fc00::/7) Since parsing IP networks and addresses can be costly, store the result of [sr.ht]internal-ipnet into a global list of net.IPNet and a convenience IsInternalIP() function to be called by services. Signed-off-by: Robin Jarry <robin@jarry.cc>
Robin Jarry <robin@jarry.cc> — 2024-12-18 14:07:50 UTC
Commit deb699c9d01acf127800ce7eedc8d40826b11e98 —
view raw patch
Parent(s):
0ad8eb8e
| File | Status | + | − |
|---|---|---|---|
config/config.go
|
M | +29 | -2 |