Parcourir la source

update iran.dat from xray zip

Hamidreza Ghavami il y a 1 an
Parent
commit
81838b504c
2 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 4 0
      web/service/server.go
  2. 4 0
      xray/process.go

+ 4 - 0
web/service/server.go

@@ -323,6 +323,10 @@ func (s *ServerService) UpdateXray(version string) error {
 	if err != nil {
 		return err
 	}
+	err = copyZipFile("iran.dat", xray.GetIranPath())
+	if err != nil {
+		return err
+	}
 
 	return nil
 

+ 4 - 0
xray/process.go

@@ -45,6 +45,10 @@ func GetGeoipPath() string {
 	return config.GetBinFolderPath() + "/geoip.dat"
 }
 
+func GetIranPath() string {
+	return config.GetBinFolderPath() + "/iran.dat"
+}
+
 func GetBlockedIPsPath() string {
 	return config.GetBinFolderPath() + "/blockedIPs"
 }