Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/entity')
-rw-r--r--web/entity/entity.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/entity/entity.go b/web/entity/entity.go
index 543b80e0..889c9024 100644
--- a/web/entity/entity.go
+++ b/web/entity/entity.go
@@ -5,6 +5,7 @@ import (
"net"
"strings"
"time"
+ "math"
"x-ui/util/common"
)
@@ -78,11 +79,11 @@ func (s *AllSetting) CheckValid() error {
}
}
- if s.WebPort <= 0 || s.WebPort > 65535 {
+ if s.WebPort <= 0 || s.WebPort > math.MaxUint16 {
return common.NewError("web port is not a valid port:", s.WebPort)
}
- if s.SubPort <= 0 || s.SubPort > 65535 {
+ if s.SubPort <= 0 || s.SubPort > math.MaxUint16 {
return common.NewError("Sub port is not a valid port:", s.SubPort)
}