소스 검색

Fix: LoadDefault should not apply dns patch

kr328 3 년 전
부모
커밋
a7b560b576
1개의 변경된 파일1개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 6
      core/src/main/golang/native/config/load.go

+ 1 - 6
core/src/main/golang/native/config/load.go

@@ -9,7 +9,6 @@ import (
 	"gopkg.in/yaml.v2"
 
 	"cfa/native/app"
-	"github.com/Dreamacro/clash/constant"
 	"github.com/Dreamacro/clash/log"
 
 	"github.com/Dreamacro/clash/config"
@@ -87,11 +86,7 @@ func Load(path string) error {
 }
 
 func LoadDefault() {
-	rawConfig, _ := config.UnmarshalRawConfig([]byte{})
-
-	_ = patchDns(rawConfig, constant.Path.HomeDir())
-
-	cfg, err := config.ParseRawConfig(rawConfig)
+	cfg, err := config.Parse([]byte{})
 	if err != nil {
 		panic(err.Error())
 	}