mirror of
https://github.com/fatedier/frp.git
synced 2024-12-16 11:41:06 +01:00
net: fix HTTP_PROXY include escape characters error, fix #275
This commit is contained in:
parent
1c04de380d
commit
6c13b6d37a
@ -128,7 +128,9 @@ func ConnectTcpServerByHttpProxy(httpProxy string, serverAddr string) (c Conn, e
|
|||||||
|
|
||||||
var proxyAuth string
|
var proxyAuth string
|
||||||
if proxyUrl.User != nil {
|
if proxyUrl.User != nil {
|
||||||
proxyAuth = "Basic " + base64.StdEncoding.EncodeToString([]byte(proxyUrl.User.String()))
|
username := proxyUrl.User.Username()
|
||||||
|
passwd, _ := proxyUrl.User.Password()
|
||||||
|
proxyAuth = "Basic " + base64.StdEncoding.EncodeToString([]byte(username+":"+passwd))
|
||||||
}
|
}
|
||||||
|
|
||||||
if proxyUrl.Scheme != "http" {
|
if proxyUrl.Scheme != "http" {
|
||||||
|
Loading…
Reference in New Issue
Block a user