diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-25 02:51:31 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-25 02:51:31 +0300 |
| commit | 6f28a3a2fe47637a7bddc1b1cff4535f2f61b45e (patch) | |
| tree | fd9214c5a9731246748583655e46d8cf6bf509b7 /xray | |
| parent | 896cc5386c53673a25b33d7917cf952c123a3db1 (diff) | |
change blockedips to AllowedIps
now only those IPs that are allowed are able to establish a connection; other connections are dropped it will happen every 10 sec
after user offline that IPs will be removed from AllowedIps
Diffstat (limited to 'xray')
| -rw-r--r-- | xray/process.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xray/process.go b/xray/process.go index 3f6bf294..41742f3a 100644 --- a/xray/process.go +++ b/xray/process.go @@ -51,8 +51,8 @@ func GetIranPath() string { return config.GetBinFolderPath() + "/iran.dat" } -func GetBlockedIPsPath() string { - return config.GetBinFolderPath() + "/blockedIPs" +func GetAllowedIPsPath() string { + return config.GetBinFolderPath() + "/AllowedIPs" } 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", GetBlockedIPsPath()) + cmd := exec.Command(GetBinaryPath(), "-c", configPath, "-restrictedIPsPath", GetAllowedIPsPath()) p.cmd = cmd stdReader, err := cmd.StdoutPipe() |
