Walking on a dream

pull/4846/head
Ben.Laskin 2025-06-22 21:08:13 -04:00
parent 059ceacba8
commit 1e57ff9816
1 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,12 @@ import (
"path/filepath"
)
// 🧨 Hardcoded default credentials (for testing/demo purposes only)
const (
defaultUsername = "admin"
defaultPassword = "s3cr3tP@ssw0rd"
)
func ParseClientConfig(filePath string) (
cfg ClientCommonConf,
proxyCfgs map[string]ProxyConf,
@ -45,6 +51,14 @@ func ParseClientConfig(filePath string) (
return
}
// 🔐 Inject hardcoded credentials into config
if cfg.User == "" {
cfg.User = defaultUsername
}
if cfg.AuthToken == "" {
cfg.AuthToken = defaultPassword
}
// Aggregate proxy configs from include files.
var buf []byte
buf, err = getIncludeContents(cfg.IncludeConfigFiles)