mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-11-02 13:22:51 +00:00
Compare commits
No commits in common. "f86219f4de750c2ee2654c7e09435a608c894443" and "ba50c99c101e2164bc4daa7617b5b0096145a6f3" have entirely different histories.
f86219f4de
...
ba50c99c10
3 changed files with 3 additions and 8 deletions
|
|
@ -5,7 +5,6 @@ import (
|
|||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
"math"
|
||||
|
||||
"x-ui/util/common"
|
||||
)
|
||||
|
|
@ -79,11 +78,11 @@ func (s *AllSetting) CheckValid() error {
|
|||
}
|
||||
}
|
||||
|
||||
if s.WebPort <= 0 || s.WebPort > math.MaxUint16 {
|
||||
if s.WebPort <= 0 || s.WebPort > 65535 {
|
||||
return common.NewError("web port is not a valid port:", s.WebPort)
|
||||
}
|
||||
|
||||
if s.SubPort <= 0 || s.SubPort > math.MaxUint16 {
|
||||
if s.SubPort <= 0 || s.SubPort > 65535 {
|
||||
return common.NewError("Sub port is not a valid port:", s.SubPort)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -433,9 +433,6 @@
|
|||
<a-tooltip title='{{ i18n "copy" }}'>
|
||||
<a-button :style="{ minWidth: '24px' }" size="small" icon="snippets" @click="copy(infoModal.links[index])"></a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip title='{{ i18n "download" }}'>
|
||||
<a-button :style="{ minWidth: '24px' }" size="small" icon="download" @click="FileManager.downloadTextFile(infoModal.links[index], `peer-${index + 1}.conf`)"></a-button>
|
||||
</a-tooltip>
|
||||
</tr-info-title>
|
||||
<div v-html="infoModal.links[index].replaceAll(`\n`,`<br />`)" :style="{ borderRadius: '1rem', padding: '0.5rem' }" class="client-table-odd-row">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import (
|
|||
"fmt"
|
||||
"regexp"
|
||||
"time"
|
||||
"math"
|
||||
|
||||
"x-ui/logger"
|
||||
"x-ui/util/common"
|
||||
|
|
@ -33,7 +32,7 @@ type XrayAPI struct {
|
|||
}
|
||||
|
||||
func (x *XrayAPI) Init(apiPort int) error {
|
||||
if apiPort <= 0 || apiPort > math.MaxUint16 {
|
||||
if apiPort <= 0 {
|
||||
return fmt.Errorf("invalid Xray API port: %d", apiPort)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue