Implement cache for networks

This commit is contained in:
WeebDataHoarder
2025-04-23 20:12:02 +02:00
parent a0224cb21c
commit 6bb7ca979d
6 changed files with 164 additions and 13 deletions

View File

@@ -27,6 +27,7 @@ type Network struct {
}
func (n Network) FetchPrefixes(c *http.Client, whois *utils.RADb) (output []net.IPNet, err error) {
if len(n.Prefixes) > 0 {
for _, prefix := range n.Prefixes {
ipNet, err := parseCIDROrIP(prefix)

View File

@@ -1,10 +1,12 @@
package policy
import (
"git.gammaspectra.live/git/go-away/utils"
"net/http"
)
type Settings struct {
Cache utils.Cache
Backends map[string]http.Handler
PrivateKeySeed []byte
Debug bool