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
path: root/util
diff options
context:
space:
mode:
authorHamidreza <70919649+hamid-gh98@users.noreply.github.com>2024-03-11 00:31:24 +0300
committerGitHub <noreply@github.com>2024-03-11 00:31:24 +0300
commit64a5a9f1bc91297bf46ddda9fc3575e582acd83f (patch)
treef8a3cbd685bf4ef77bb69b6b22c130d2dad42f88 /util
parent32afd7200ace358fe36c8c438f5048d76fbc987b (diff)
Some fixes and improvements (#1997)
* [refactor] api controller * [fix] access log path better to not hardcode the access log path, maybe some ppl dont want to use the default ./access.log * [fix] set select options from logs paths in xray settings * [update] .gitignore * [lint] all .go files * [update] use status code for jsonMsg and 401 to unauthorize * [update] handle response status code via axios * [fix] set correct value if log paths is set to 'none' we also use the default value for the paths if its set to none * [fix] iplimit - only warning access log if f2b is installed
Diffstat (limited to 'util')
-rw-r--r--util/common/err.go1
-rw-r--r--util/random/random.go14
2 files changed, 9 insertions, 6 deletions
diff --git a/util/common/err.go b/util/common/err.go
index f6078c33..494e5c82 100644
--- a/util/common/err.go
+++ b/util/common/err.go
@@ -3,6 +3,7 @@ package common
import (
"errors"
"fmt"
+
"x-ui/logger"
)
diff --git a/util/random/random.go b/util/random/random.go
index 1dd47ec9..67ee0691 100644
--- a/util/random/random.go
+++ b/util/random/random.go
@@ -4,12 +4,14 @@ import (
"math/rand"
)
-var numSeq [10]rune
-var lowerSeq [26]rune
-var upperSeq [26]rune
-var numLowerSeq [36]rune
-var numUpperSeq [36]rune
-var allSeq [62]rune
+var (
+ numSeq [10]rune
+ lowerSeq [26]rune
+ upperSeq [26]rune
+ numLowerSeq [36]rune
+ numUpperSeq [36]rune
+ allSeq [62]rune
+)
func init() {
for i := 0; i < 10; i++ {