mirror of https://github.com/v2ray/v2ray-core
Merge branch 'master' into 2750-conflicts
commit
58694e75d9
|
@ -0,0 +1 @@
|
|||
Please Move to https://github.com/v2fly/v2ray-core/pulls
|
|
@ -1,3 +1,7 @@
|
|||
# Move To https://github.com/v2fly/v2ray-core
|
||||
|
||||
***
|
||||
|
||||
# Project V
|
||||
![](https://github.com/v2fly/v2ray-core/workflows/Test/badge.svg)
|
||||
[![codecov.io][3]][4] [![GoDoc][5]][6] [![codebeat][7]][8] [![Downloads][9]][10] [![Downloads][11]][12]
|
||||
|
|
|
@ -166,4 +166,4 @@ func init() {
|
|||
common.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {
|
||||
return NewManager(ctx, config.(*Config))
|
||||
}))
|
||||
}
|
||||
}
|
|
@ -111,7 +111,7 @@ Start:
|
|||
if len(s.config.Accounts) > 0 {
|
||||
user, pass, ok := parseBasicAuth(request.Header.Get("Proxy-Authorization"))
|
||||
if !ok || !s.config.HasAccount(user, pass) {
|
||||
return common.Error2(conn.Write([]byte("HTTP/1.1 407 Proxy Authentication Required\r\nProxy-Authenticate: Basic realm=\"proxy\"\r\n\r\n")))
|
||||
return common.Error2(conn.Write([]byte("HTTP/1.1 407 Proxy Authentication Required\r\nProxy-Authenticate: Basic realm=\"proxy\"\r\nConnection: close\r\n\r\n")))
|
||||
}
|
||||
if inbound != nil {
|
||||
inbound.User.Email = user
|
||||
|
|
|
@ -190,13 +190,12 @@ func (v *TimedUserValidator) Remove(email string) bool {
|
|||
v.Lock()
|
||||
defer v.Unlock()
|
||||
|
||||
email = strings.ToLower(email)
|
||||
idx := -1
|
||||
for i, u := range v.users {
|
||||
if strings.EqualFold(u.user.Email, email) {
|
||||
for i := range v.users {
|
||||
if strings.EqualFold(v.users[i].user.Email, email) {
|
||||
idx = i
|
||||
var cmdkeyfl [16]byte
|
||||
copy(cmdkeyfl[:], u.user.Account.(*MemoryAccount).ID.CmdKey())
|
||||
copy(cmdkeyfl[:], v.users[i].user.Account.(*MemoryAccount).ID.CmdKey())
|
||||
v.aeadDecoderHolder.RemoveUser(cmdkeyfl)
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue