mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
feat(server): introduce DefaultConfigPath for streamlined configuration
- Added `DefaultConfigPath` variable to manage default configuration file paths. - Updated `config` flag to use `DefaultConfigPath` for better path handling.
This commit is contained in:
@@ -24,6 +24,7 @@ var (
|
|||||||
Version = "dev"
|
Version = "dev"
|
||||||
Commit = "none"
|
Commit = "none"
|
||||||
BuildDate = "unknown"
|
BuildDate = "unknown"
|
||||||
|
DefaultConfigPath = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
// init initializes the shared logger setup.
|
// init initializes the shared logger setup.
|
||||||
@@ -58,7 +59,7 @@ func main() {
|
|||||||
flag.BoolVar(&geminiWebAuth, "gemini-web-auth", false, "Auth Gemini Web using cookies")
|
flag.BoolVar(&geminiWebAuth, "gemini-web-auth", false, "Auth Gemini Web using cookies")
|
||||||
flag.BoolVar(&noBrowser, "no-browser", false, "Don't open browser automatically for OAuth")
|
flag.BoolVar(&noBrowser, "no-browser", false, "Don't open browser automatically for OAuth")
|
||||||
flag.StringVar(&projectID, "project_id", "", "Project ID (Gemini only, not required)")
|
flag.StringVar(&projectID, "project_id", "", "Project ID (Gemini only, not required)")
|
||||||
flag.StringVar(&configPath, "config", "", "Configure File Path")
|
flag.StringVar(&configPath, "config", DefaultConfigPath, "Configure File Path")
|
||||||
flag.StringVar(&password, "password", "", "")
|
flag.StringVar(&password, "password", "", "")
|
||||||
|
|
||||||
flag.CommandLine.Usage = func() {
|
flag.CommandLine.Usage = func() {
|
||||||
|
|||||||
Reference in New Issue
Block a user