mirror of https://github.com/fatedier/frp
Walking on a dream
parent
059ceacba8
commit
1e57ff9816
|
@ -21,6 +21,12 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 🧨 Hardcoded default credentials (for testing/demo purposes only)
|
||||||
|
const (
|
||||||
|
defaultUsername = "admin"
|
||||||
|
defaultPassword = "s3cr3tP@ssw0rd"
|
||||||
|
)
|
||||||
|
|
||||||
func ParseClientConfig(filePath string) (
|
func ParseClientConfig(filePath string) (
|
||||||
cfg ClientCommonConf,
|
cfg ClientCommonConf,
|
||||||
proxyCfgs map[string]ProxyConf,
|
proxyCfgs map[string]ProxyConf,
|
||||||
|
@ -45,6 +51,14 @@ func ParseClientConfig(filePath string) (
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 🔐 Inject hardcoded credentials into config
|
||||||
|
if cfg.User == "" {
|
||||||
|
cfg.User = defaultUsername
|
||||||
|
}
|
||||||
|
if cfg.AuthToken == "" {
|
||||||
|
cfg.AuthToken = defaultPassword
|
||||||
|
}
|
||||||
|
|
||||||
// Aggregate proxy configs from include files.
|
// Aggregate proxy configs from include files.
|
||||||
var buf []byte
|
var buf []byte
|
||||||
buf, err = getIncludeContents(cfg.IncludeConfigFiles)
|
buf, err = getIncludeContents(cfg.IncludeConfigFiles)
|
||||||
|
|
Loading…
Reference in New Issue