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 'main.go')
-rw-r--r--main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.go b/main.go
index e0b83969..ed30a11f 100644
--- a/main.go
+++ b/main.go
@@ -16,6 +16,7 @@ import (
"x-ui/web"
"x-ui/web/global"
"x-ui/web/service"
+ "x-ui/util/crypto"
"github.com/op/go-logging"
)
@@ -161,6 +162,12 @@ func showSetting(show bool) {
} else {
fmt.Println("Panel is secure with SSL")
}
+
+ hasDefaultCredential := func() bool {
+ return userModel.Username == "admin" && crypto.CheckPasswordHash(userModel.Password, "admin")
+ }()
+
+ fmt.Println("hasDefaultCredential:", hasDefaultCredential)
fmt.Println("port:", port)
fmt.Println("webBasePath:", webBasePath)
}