Skip to content

Commit

Permalink
Merge pull request #2 from jagotu/master
Browse files Browse the repository at this point in the history
Accept HTTP/1.0 when authenticating to a proxy
  • Loading branch information
kost authored Feb 21, 2022
2 parents f16f0fe + e835d3e commit a6ff65d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ func connectviaproxy(proxyaddr string, connectaddr string) net.Conn {
//disable socket read timeouts
conn.SetReadDeadline(time.Now().Add(100 * time.Hour))

if strings.Contains(status, "HTTP/1.1 200 ") {
if (strings.Contains(status, "HTTP/1.1 200 ")) ||
(strings.Contains(status, "HTTP/1.0 200 ")) {
log.Print("Connected via proxy")
return conn
}
Expand Down

0 comments on commit a6ff65d

Please sign in to comment.