mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 10:43:13 +08:00
[build test] 1.18
This commit is contained in:
parent
016862f7a5
commit
2f24e49ff6
@ -146,6 +146,16 @@ func Init(dir string) error {
|
|||||||
f.Write([]byte(`mixed-port: 7890`))
|
f.Write([]byte(`mixed-port: 7890`))
|
||||||
f.Close()
|
f.Close()
|
||||||
}
|
}
|
||||||
|
buf, _ := os.ReadFile(C.Path.Config())
|
||||||
|
rawCfg, err := UnmarshalRawConfig(buf)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorln(err.Error())
|
||||||
|
fmt.Printf("configuration file %s test failed\n", C.Path.Config())
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
if !C.GeodataMode {
|
||||||
|
C.GeodataMode = rawCfg.GeodataMode
|
||||||
|
}
|
||||||
// initial GeoIP
|
// initial GeoIP
|
||||||
if err := initGeoIP(); err != nil {
|
if err := initGeoIP(); err != nil {
|
||||||
return fmt.Errorf("can't initial GeoIP: %w", err)
|
return fmt.Errorf("can't initial GeoIP: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user