Prechádzať zdrojové kódy

Fix geosite path (#17)

`geoIPOptions` -> `geositeOptions`

Signed-off-by: Tianling Shen <[email protected]>
Tianling Shen 3 rokov pred
rodič
commit
7ead0de26b
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      route/router.go

+ 3 - 3
route/router.go

@@ -787,7 +787,7 @@ func (r *Router) prepareGeoIPDatabase() error {
 func (r *Router) prepareGeositeDatabase() error {
 func (r *Router) prepareGeositeDatabase() error {
 	var geoPath string
 	var geoPath string
 	if r.geositeOptions.Path != "" {
 	if r.geositeOptions.Path != "" {
-		geoPath = r.geoIPOptions.Path
+		geoPath = r.geositeOptions.Path
 	} else {
 	} else {
 		geoPath = "geosite.db"
 		geoPath = "geosite.db"
 		if foundPath, loaded := C.FindPath(geoPath); loaded {
 		if foundPath, loaded := C.FindPath(geoPath); loaded {
@@ -874,12 +874,12 @@ func (r *Router) downloadGeositeDatabase(savePath string) error {
 	} else {
 	} else {
 		downloadURL = "https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db"
 		downloadURL = "https://github.com/SagerNet/sing-geosite/releases/latest/download/geosite.db"
 	}
 	}
-	r.logger.Info("downloading geoip database")
+	r.logger.Info("downloading geosite database")
 	var detour adapter.Outbound
 	var detour adapter.Outbound
 	if r.geositeOptions.DownloadDetour != "" {
 	if r.geositeOptions.DownloadDetour != "" {
 		outbound, loaded := r.Outbound(r.geositeOptions.DownloadDetour)
 		outbound, loaded := r.Outbound(r.geositeOptions.DownloadDetour)
 		if !loaded {
 		if !loaded {
-			return E.New("detour outbound not found: ", r.geoIPOptions.DownloadDetour)
+			return E.New("detour outbound not found: ", r.geositeOptions.DownloadDetour)
 		}
 		}
 		detour = outbound
 		detour = outbound
 	} else {
 	} else {