[Skip CI]
This commit is contained in:
6
main.go
6
main.go
@ -22,6 +22,7 @@ var (
|
||||
flagset map[string]bool
|
||||
version bool
|
||||
testConfig bool
|
||||
geodataMode bool
|
||||
homeDir string
|
||||
configFile string
|
||||
externalUI string
|
||||
@ -35,6 +36,7 @@ func init() {
|
||||
flag.StringVar(&externalUI, "ext-ui", "", "override external ui directory")
|
||||
flag.StringVar(&externalController, "ext-ctl", "", "override external controller address")
|
||||
flag.StringVar(&secret, "secret", "", "override secret for RESTful API")
|
||||
flag.BoolVar(&geodataMode, "m", false, "set geodata mode")
|
||||
flag.BoolVar(&version, "v", false, "show current version of clash")
|
||||
flag.BoolVar(&testConfig, "t", false, "test configuration and exit")
|
||||
flag.Parse()
|
||||
@ -75,6 +77,10 @@ func main() {
|
||||
log.Fatalln("Initial configuration directory error: %s", err.Error())
|
||||
}
|
||||
|
||||
if geodataMode {
|
||||
config.GeodataMode = true
|
||||
}
|
||||
|
||||
if testConfig {
|
||||
if _, err := executor.Parse(); err != nil {
|
||||
log.Errorln(err.Error())
|
||||
|
Reference in New Issue
Block a user