mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
25w16a
This commit is contained in:
parent
d26f6d1e1b
commit
a18660121a
18 changed files with 638 additions and 118 deletions
|
|
@ -7,9 +7,9 @@ import (
|
|||
type Config struct {
|
||||
Server ServerConfig
|
||||
Httpc HttpcConfig
|
||||
GitClone GitCloneConfig
|
||||
Pages PagesConfig
|
||||
Log LogConfig
|
||||
CORS CORSConfig
|
||||
Auth AuthConfig
|
||||
Blacklist BlacklistConfig
|
||||
Whitelist WhitelistConfig
|
||||
|
|
@ -31,6 +31,7 @@ type ServerConfig struct {
|
|||
Host string `toml:"host"`
|
||||
SizeLimit int `toml:"sizeLimit"`
|
||||
H2C bool `toml:"H2C"`
|
||||
Cors string `toml:"cors"`
|
||||
EnableH2C string `toml:"enableH2C"`
|
||||
Debug bool `toml:"debug"`
|
||||
}
|
||||
|
|
@ -49,6 +50,16 @@ type HttpcConfig struct {
|
|||
MaxConnsPerHost int `toml:"maxConnsPerHost"`
|
||||
}
|
||||
|
||||
/*
|
||||
[gitclone]
|
||||
mode = "bypass" # bypass / cache
|
||||
dir = "./repos"
|
||||
*/
|
||||
type GitCloneConfig struct {
|
||||
Mode string `toml:"mode"`
|
||||
Dir string `toml:"dir"`
|
||||
}
|
||||
|
||||
/*
|
||||
[pages]
|
||||
mode = "internal" # "internal" or "external"
|
||||
|
|
@ -69,10 +80,6 @@ type LogConfig struct {
|
|||
Level string `toml:"level"`
|
||||
}
|
||||
|
||||
type CORSConfig struct {
|
||||
Enabled bool `toml:"enabled"`
|
||||
}
|
||||
|
||||
type AuthConfig struct {
|
||||
Enabled bool `toml:"enabled"`
|
||||
AuthMethod string `toml:"authMethod"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue