some changes

ip limit method back to v1.6.0 method
remove event on getDBClientIps
better show ip on log (",\n")
This commit is contained in:
MHSanaei
2023-06-03 18:59:32 +03:30
parent 33a598366b
commit fdc1124ea4
6 changed files with 86 additions and 102 deletions

View File

@@ -51,8 +51,8 @@ func GetIranPath() string {
return config.GetBinFolderPath() + "/iran.dat"
}
func GetAllowedIPsPath() string {
return config.GetBinFolderPath() + "/AllowedIPs"
func GetBlockedIPsPath() string {
return config.GetBinFolderPath() + "/BlockedIps"
}
func stopProcess(p *Process) {
@@ -173,7 +173,7 @@ func (p *process) Start() (err error) {
return common.NewErrorf("Failed to write configuration file: %v", err)
}
cmd := exec.Command(GetBinaryPath(), "-c", configPath, "-restrictedIPsPath", GetAllowedIPsPath())
cmd := exec.Command(GetBinaryPath(), "-c", configPath, "-restrictedIPsPath", GetBlockedIPsPath())
p.cmd = cmd
stdReader, err := cmd.StdoutPipe()