[build test] 1.18

This commit is contained in:
gVisor bot 2022-03-16 21:47:00 +08:00
parent a57355aae3
commit 5af26db8ff
2 changed files with 11 additions and 1 deletions

View File

@ -146,6 +146,16 @@ func Init(dir string) error {
f.Write([]byte(`mixed-port: 7890`))
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
if err := initGeoIP(); err != nil {
return fmt.Errorf("can't initial GeoIP: %w", err)

View File

@ -73,7 +73,7 @@ func main() {
C.SetConfig(configFile)
}
if geodataMode || executor.GetGeneral().GeodataMode {
if geodataMode {
C.GeodataMode = true
}