mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
24w11a
This commit is contained in:
parent
f5d7d0994e
commit
dc8f4a28e9
9 changed files with 112 additions and 13 deletions
|
|
@ -31,6 +31,11 @@ type Config struct {
|
|||
Enabled bool `yaml:"enabled"`
|
||||
BlacklistFile string `yaml:"blacklistfile"`
|
||||
} `yaml:"blacklist"`
|
||||
|
||||
Whitelist struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
WhitelistFile string `yaml:"whitelistfile"`
|
||||
} `yaml:"whitelist"`
|
||||
}
|
||||
|
||||
// LoadConfig 从 YAML 配置文件加载配置
|
||||
|
|
|
|||
|
|
@ -20,5 +20,10 @@ auth:
|
|||
|
||||
# Blacklist Configuration
|
||||
blacklist:
|
||||
enabled: true
|
||||
enabled: false
|
||||
blacklistfile: "/data/ghproxy/config/blacklist.json"
|
||||
|
||||
# Whitelist Configuration
|
||||
whitelist:
|
||||
enabled: false
|
||||
whitelistfile: "/data/ghproxy/config/whitelist.json"
|
||||
8
config/whitelist.json
Normal file
8
config/whitelist.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"whitelist": [
|
||||
"test/test1",
|
||||
"example/repo2",
|
||||
"another/repo3"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue