mirror of https://github.com/v2ray/v2ray-core
fix basic auth response
parent
82009c869e
commit
b81ff78af3
|
@ -121,8 +121,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) {
|
||||||
_, err := conn.Write([]byte("HTTP/1.1 407 Proxy Authentication Required\r\n" +
|
_, err := conn.Write([]byte("HTTP/1.1 407 Proxy Authentication Required\r\nProxy-Authenticate: Basic realm=\"proxy\"\r\n\r\n"))
|
||||||
"Proxy-Authenticate: Basic realm=\"V2Ray\"\r\n\r\n"))
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue