From 81838b504c0f445f9a0daff32a394bd0a149922b Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami Date: Fri, 21 Apr 2023 02:14:00 +0430 Subject: [PATCH] update iran.dat from xray zip --- web/service/server.go | 4 ++++ xray/process.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/web/service/server.go b/web/service/server.go index f2540252..1108926b 100644 --- a/web/service/server.go +++ b/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 diff --git a/xray/process.go b/xray/process.go index 35907391..e7774ea4 100644 --- a/xray/process.go +++ b/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" }