Projects STRLCPY SeaMoon Commits edddb495
🤬
  • ■ ■ ■ ■ ■
    pkg/api/service/tunnel.go
    skipped 54 lines
    55 55   }
    56 56   
    57 57   // 手动填充账户与密码
    58  - obj.Config.V2rayUid = tools.GenerateUUID()
    59  - obj.Config.SSRPass = tools.GenerateRandomString(12)
     58 + if obj.Config.V2rayUid == "" {
     59 + obj.Config.V2rayUid = tools.GenerateUUID()
     60 + }
     61 + if obj.Config.SSRPass == "" {
     62 + obj.Config.SSRPass = tools.GenerateRandomString(12)
     63 + }
    60 64   // todo: 开放认证
    61  - obj.Config.SSRCrypt = "aes-256-gcm"
     65 + if obj.Config.SSRCrypt == "" {
     66 + obj.Config.SSRCrypt = "aes-256-gcm"
     67 + }
    62 68   
    63 69   if err = dao.Q.Tunnel.WithContext(ctx).Create(obj); err != nil {
    64 70   return nil, err
    skipped 91 lines
Please wait...
Page is in error, reload to recover