增加管理后台

This commit is contained in:
bjd
2020-12-16 16:36:56 +08:00
parent 31b1f12dbe
commit a9584000c6
68 changed files with 2408 additions and 1281 deletions

View File

@@ -6,12 +6,12 @@ import (
"github.com/stretchr/testify/assert"
"github.com/bjdgyc/anylink/common"
"github.com/bjdgyc/anylink/base"
)
// func TestCheckUser(t *testing.T) {
// users["user1"] = User{Password: "7c4a8d09ca3762af61e59520943dc26494f8941b"}
// users["user2"] = User{Password: "7c4a8d09ca3762af61e59520943dc26494f8941c"}
// user["user1"] = User{Password: "7c4a8d09ca3762af61e59520943dc26494f8941b"}
// user["user2"] = User{Password: "7c4a8d09ca3762af61e59520943dc26494f8941c"}
//
// var res bool
// res = CheckUser("user1", "123456", "")
@@ -23,8 +23,8 @@ import (
func TestLimitClient(t *testing.T) {
assert := assert.New(t)
common.ServerCfg.MaxClient = 2
common.ServerCfg.MaxUserClient = 1
base.Cfg.MaxClient = 2
base.Cfg.MaxUserClient = 1
res1 := LimitClient("user1", false)
res2 := LimitClient("user1", false)