mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-11 17:53:58 +03:00
Resolves conflicts
This commit is contained in:
commit
5abb066df5
5 changed files with 25 additions and 12 deletions
|
@ -8,11 +8,12 @@ import (
|
|||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
"github.com/sdomino/scribble"
|
||||
"github.com/skip2/go-qrcode"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/model"
|
||||
"github.com/ngoduykhanh/wireguard-ui/util"
|
||||
)
|
||||
|
||||
type JsonDB struct {
|
||||
|
@ -93,8 +94,8 @@ func (o *JsonDB) Init() error {
|
|||
// user info
|
||||
if _, err := os.Stat(userPath); os.IsNotExist(err) {
|
||||
user := new(model.User)
|
||||
user.Username = util.DefaultUsername
|
||||
user.Password = util.DefaultPassword
|
||||
user.Username = util.GetCredVar(util.UsernameEnvVar, util.DefaultUsername)
|
||||
user.Password = util.GetCredVar(util.PasswordEnvVar, util.DefaultPassword)
|
||||
o.conn.Write("server", "users", user)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue