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
|
# Project V
|
||||||

|

|
||||||
[![codecov.io][3]][4] [![GoDoc][5]][6] [![codebeat][7]][8] [![Downloads][9]][10] [![Downloads][11]][12]
|
[![codecov.io][3]][4] [![GoDoc][5]][6] [![codebeat][7]][8] [![Downloads][9]][10] [![Downloads][11]][12]
|
||||||
|
|
|
@ -111,7 +111,7 @@ Start:
|
||||||
if len(s.config.Accounts) > 0 {
|
if len(s.config.Accounts) > 0 {
|
||||||
user, pass, ok := parseBasicAuth(request.Header.Get("Proxy-Authorization"))
|
user, pass, ok := parseBasicAuth(request.Header.Get("Proxy-Authorization"))
|
||||||
if !ok || !s.config.HasAccount(user, pass) {
|
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 {
|
if inbound != nil {
|
||||||
inbound.User.Email = user
|
inbound.User.Email = user
|
||||||
|
|
|
@ -190,13 +190,12 @@ func (v *TimedUserValidator) Remove(email string) bool {
|
||||||
v.Lock()
|
v.Lock()
|
||||||
defer v.Unlock()
|
defer v.Unlock()
|
||||||
|
|
||||||
email = strings.ToLower(email)
|
|
||||||
idx := -1
|
idx := -1
|
||||||
for i, u := range v.users {
|
for i := range v.users {
|
||||||
if strings.EqualFold(u.user.Email, email) {
|
if strings.EqualFold(v.users[i].user.Email, email) {
|
||||||
idx = i
|
idx = i
|
||||||
var cmdkeyfl [16]byte
|
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)
|
v.aeadDecoderHolder.RemoveUser(cmdkeyfl)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue