Skip to content

Commit

Permalink
Merge pull request #462 from mionskowski-form3/recognize-errors-behin…
Browse files Browse the repository at this point in the history
…d-proxy

errkit: detect permanent network errors when behind http/socks proxy
  • Loading branch information
tarunKoyalwar authored Jul 11, 2024
2 parents fcdd849 + 614c660 commit 84547c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions errkit/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ func isNetworkPermanentErr(err *ErrorX) bool {
return true
case strings.Contains(v, "connect: connection refused"):
return true
case strings.Contains(v, "Unable to connect"):
// occurs when HTTP(S) proxy is used
return true
case strings.Contains(v, "host unreachable"):
// occurs when SOCKS proxy is used
return true
}
return false
}
Expand Down

0 comments on commit 84547c4

Please sign in to comment.