From 2c72224c6e87fdd9aae4f56819851e8f0febe2e5 Mon Sep 17 00:00:00 2001 From: GameXG Date: Tue, 21 Jan 2020 19:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20http=20=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E8=B4=A6=E5=AF=86=E7=99=BB=E9=99=86=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxyclient.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxyclient.go b/proxyclient.go index cfbb2f7..374a476 100644 --- a/proxyclient.go +++ b/proxyclient.go @@ -192,7 +192,9 @@ func NewProxyClient(addr string) (ProxyClient, error) { case "http", "https": auth := "" if u.User != nil { - auth = u.User.String() + password,_:=u.User.Password() + // 必须自己重新生成,因为 User.String() 会将密码内的 ! 等特殊符号编码,造成鉴定失败 + auth =fmt.Sprintf("%v:%v", u.User.Username(),password) } standardHeader := false