From 89e867824d36463d2f823d7aa812949afb4157ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A5=E5=B0=98=EF=BC=88=E6=A8=B1=E3=81=AE=E6=B3=AA?= =?UTF-8?q?=EF=BC=89?= Date: Sun, 24 Feb 2019 12:28:53 +0800 Subject: [PATCH] fix: config ipv4 prefer and database sync time change to 60s --- common/config/config.go | 11 +++++++---- db/db.go | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common/config/config.go b/common/config/config.go index b874882..cac4ecf 100644 --- a/common/config/config.go +++ b/common/config/config.go @@ -58,8 +58,10 @@ func DefaultConfig() *Config { return &Config{ Mode: "db", DbConfig: DbConfig{ - Level: -1, - Rate: -1, + Level: -1, + Rate: -1, + SyncTime: 60000, + OnlineSyncTime: 60000, }, ShadowsocksOptions: ShadowsocksOptions{ ConnectTimeout: 3000, @@ -67,8 +69,9 @@ func DefaultConfig() *Config { UDPSwitch: "true", }, DNSOptions: DnsOptions{ - DNS1: "8.8.8.8:53", - DNS2: "8.8.4.4:53", + DNS1: "8.8.8.8:53", + DNS2: "8.8.4.4:53", + IPV4Prefer: true, }, } } diff --git a/db/db.go b/db/db.go index 201e239..fde63bc 100644 --- a/db/db.go +++ b/db/db.go @@ -164,7 +164,7 @@ func DbStarted(ctx context.Context) { if conf.DbConfig.SyncTime == 0 { survey.AskOne(&survey.Input{ Message: "what is your want database sync time (unit: Millisencod)?", - Default: "3000", + Default: "60000", }, &conf.DbConfig.SyncTime, nil) }