Documentation
¶
Overview ¶
Package geosync downloads geoip / geosite data files from HTTPS URLs on a schedule and reapplies GeoConfig via GeoWrapper.UpdateGeo after each successful download.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchViaDirectHTTP ¶
FetchViaDirectHTTP downloads using the process default HTTP transport (no outbound routing).
Types ¶
type GeoSync ¶
type GeoSync struct {
// contains filtered or unexported fields
}
GeoSync runs periodic HTTPS downloads for geo data files (cron from GeoRemoteFile).
func (*GeoSync) Reconfigure ¶
Reconfigure stores a clone of cfg for reloads after downloads, replaces download jobs, and restarts periodic tasks if GeoSync has already been started.
type Job ¶
type Job struct {
URL string
Filepath string
// Standard 5-field cron; empty means prefetch only at startup / reconfigure.
CronExpr string
// Atomic domain set to reload after download (partial reload).
DomainAtomicName string
// Atomic IP set to reload after download (partial reload).
IPAtomicName string
}
Job describes one on-disk geo data file synced from an HTTPS URL.
func CollectJobs ¶
CollectJobs walks GeoConfig and returns one job per remote geosite/geoip entry.
Click to show internal directories.
Click to hide internal directories.