From b81ff78af35615d9bb94c638c46a3d90c19aa409 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 5 Dec 2017 23:49:16 +0100 Subject: [PATCH] fix basic auth response --- proxy/http/server.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proxy/http/server.go b/proxy/http/server.go index 57f86c344..fa2f9e50c 100644 --- a/proxy/http/server.go +++ b/proxy/http/server.go @@ -118,11 +118,10 @@ Start: return trace } - if len(s.config.Accounts) > 0 { + if len(s.config.Accounts) > 0 { user, pass, ok := parseBasicAuth(request.Header.Get("Proxy-Authorization")) if !ok || !s.config.HasAccount(user, pass) { - _, err := conn.Write([]byte("HTTP/1.1 407 Proxy Authentication Required\r\n" + - "Proxy-Authenticate: Basic realm=\"V2Ray\"\r\n\r\n")) + _, err := conn.Write([]byte("HTTP/1.1 407 Proxy Authentication Required\r\nProxy-Authenticate: Basic realm=\"proxy\"\r\n\r\n")) return err } }