mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
24w24a
This commit is contained in:
parent
0ce5c2c11c
commit
32584f9516
10 changed files with 97 additions and 10 deletions
|
|
@ -53,9 +53,10 @@ type WhitelistConfig struct {
|
|||
}
|
||||
|
||||
type RateLimitConfig struct {
|
||||
Enabled bool `toml:"enabled"`
|
||||
RatePerMinute int `toml:"ratePerMinute"`
|
||||
Burst int `toml:"burst"`
|
||||
Enabled bool `toml:"enabled"`
|
||||
RateMethod string `toml:"rateMethod"`
|
||||
RatePerMinute int `toml:"ratePerMinute"`
|
||||
Burst int `toml:"burst"`
|
||||
}
|
||||
|
||||
// LoadConfig 从 TOML 配置文件加载配置
|
||||
|
|
|
|||
|
|
@ -30,5 +30,6 @@ whitelistFile = "/data/ghproxy/config/whitelist.json"
|
|||
|
||||
[rateLimit]
|
||||
enabled = false
|
||||
rateMrthod = "total" # "ip" or "total"
|
||||
ratePerMinute = 180
|
||||
burst = 5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue