This commit is contained in:
wjqserver 2025-03-16 21:03:28 +08:00
parent 17c49d534b
commit 4fd47812f7
13 changed files with 398 additions and 147 deletions

View file

@ -8,6 +8,7 @@ type Config struct {
Server ServerConfig
Httpc HttpcConfig
GitClone GitCloneConfig
Shell ShellConfig
Pages PagesConfig
Log LogConfig
Auth AuthConfig
@ -62,6 +63,14 @@ type GitCloneConfig struct {
ForceH2C bool `toml:"ForceH2C"`
}
/*
[shell]
editor = true
*/
type ShellConfig struct {
Editor bool `toml:"editor"`
}
/*
[pages]
mode = "internal" # "internal" or "external"
@ -82,11 +91,20 @@ type LogConfig struct {
Level string `toml:"level"`
}
/*
[auth]
authMethod = "parameters" # "header" or "parameters"
authToken = "token"
enabled = false
passThrough = false
ForceAllowApi = true
*/
type AuthConfig struct {
Enabled bool `toml:"enabled"`
AuthMethod string `toml:"authMethod"`
AuthToken string `toml:"authToken"`
PassThrough bool `toml:"passThrough"`
Enabled bool `toml:"enabled"`
AuthMethod string `toml:"authMethod"`
AuthToken string `toml:"authToken"`
PassThrough bool `toml:"passThrough"`
ForceAllowApi bool `toml:"ForceAllowApi"`
}
type BlacklistConfig struct {