This commit is contained in:
WJQSERVER 2024-10-06 04:01:53 +08:00
parent 815b86c6c6
commit 61e741c9b3
5 changed files with 18 additions and 5 deletions

View file

@ -12,12 +12,12 @@ type Config struct {
var (
cfg *config.Config
configfile = "/data/ghproxy/config/config.yaml"
blacklistfile = "/data/ghproxy/config/blacklist.json"
blacklist *Config
)
func init() {
func LoadBlacklist(cfg *config.Config) {
blacklistfile = cfg.Blacklist.BlacklistFile
blacklist = &Config{}
data, err := os.ReadFile(blacklistfile)