Fix: Port range bug

This commit is contained in:
Akkariin Meiko 2020-01-19 11:48:01 +08:00 committed by GitHub
parent 5f34bf9c2f
commit 7c6a51bcf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,7 +219,7 @@ class ProxyManager {
if(isset($_config['proxies']['protect']) && !empty($_config['proxies']['protect'])) { if(isset($_config['proxies']['protect']) && !empty($_config['proxies']['protect'])) {
foreach($_config['proxies']['protect'] as $key => $value) { foreach($_config['proxies']['protect'] as $key => $value) {
if(Intval($data['remote_port']) > $key && Intval($data['remote_port']) < $value) { if(Intval($data['remote_port']) >= $key && Intval($data['remote_port']) <= $value) {
return Array(false, "该远程端口不可用,因为它属于系统保留端口范围,详情请点击端口规则查看。"); return Array(false, "该远程端口不可用,因为它属于系统保留端口范围,详情请点击端口规则查看。");
} }
} }