mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 05:37:38 +03:00
Updater deps
This commit is contained in:
parent
5705b60936
commit
e13b4842e8
14 changed files with 203 additions and 94 deletions
2
vendor/github.com/lucas-clemente/quic-go/internal/handshake/crypto_setup.go
generated
vendored
2
vendor/github.com/lucas-clemente/quic-go/internal/handshake/crypto_setup.go
generated
vendored
|
@ -340,7 +340,7 @@ func (h *cryptoSetup) onError(alert uint8, message string) {
|
|||
if alert == 0 {
|
||||
err = &qerr.TransportError{ErrorCode: qerr.InternalError, ErrorMessage: message}
|
||||
} else {
|
||||
err = qerr.NewCryptoError(alert, message)
|
||||
err = qerr.NewLocalCryptoError(alert, message)
|
||||
}
|
||||
h.runner.OnError(err)
|
||||
}
|
||||
|
|
2
vendor/github.com/lucas-clemente/quic-go/internal/qerr/error_codes.go
generated
vendored
2
vendor/github.com/lucas-clemente/quic-go/internal/qerr/error_codes.go
generated
vendored
|
@ -81,7 +81,7 @@ func (e TransportErrorCode) String() string {
|
|||
return "NO_VIABLE_PATH"
|
||||
default:
|
||||
if e.IsCryptoError() {
|
||||
return fmt.Sprintf("CRYPTO_ERROR (%#x)", uint16(e))
|
||||
return fmt.Sprintf("CRYPTO_ERROR %#x", uint16(e))
|
||||
}
|
||||
return fmt.Sprintf("unknown error code: %#x", uint16(e))
|
||||
}
|
||||
|
|
17
vendor/github.com/lucas-clemente/quic-go/internal/qerr/errors.go
generated
vendored
17
vendor/github.com/lucas-clemente/quic-go/internal/qerr/errors.go
generated
vendored
|
@ -21,8 +21,8 @@ type TransportError struct {
|
|||
|
||||
var _ error = &TransportError{}
|
||||
|
||||
// NewCryptoError create a new TransportError instance for a crypto error
|
||||
func NewCryptoError(tlsAlert uint8, errorMessage string) *TransportError {
|
||||
// NewLocalCryptoError create a new TransportError instance for a crypto error
|
||||
func NewLocalCryptoError(tlsAlert uint8, errorMessage string) *TransportError {
|
||||
return &TransportError{
|
||||
ErrorCode: 0x100 + TransportErrorCode(tlsAlert),
|
||||
ErrorMessage: errorMessage,
|
||||
|
@ -30,7 +30,7 @@ func NewCryptoError(tlsAlert uint8, errorMessage string) *TransportError {
|
|||
}
|
||||
|
||||
func (e *TransportError) Error() string {
|
||||
str := e.ErrorCode.String()
|
||||
str := fmt.Sprintf("%s (%s)", e.ErrorCode.String(), getRole(e.Remote))
|
||||
if e.FrameType != 0 {
|
||||
str += fmt.Sprintf(" (frame type: %#x)", e.FrameType)
|
||||
}
|
||||
|
@ -68,9 +68,9 @@ var _ error = &ApplicationError{}
|
|||
|
||||
func (e *ApplicationError) Error() string {
|
||||
if len(e.ErrorMessage) == 0 {
|
||||
return fmt.Sprintf("Application error %#x", e.ErrorCode)
|
||||
return fmt.Sprintf("Application error %#x (%s)", e.ErrorCode, getRole(e.Remote))
|
||||
}
|
||||
return fmt.Sprintf("Application error %#x: %s", e.ErrorCode, e.ErrorMessage)
|
||||
return fmt.Sprintf("Application error %#x (%s): %s", e.ErrorCode, getRole(e.Remote), e.ErrorMessage)
|
||||
}
|
||||
|
||||
type IdleTimeoutError struct{}
|
||||
|
@ -122,3 +122,10 @@ func (e *StatelessResetError) Is(target error) bool {
|
|||
|
||||
func (e *StatelessResetError) Timeout() bool { return false }
|
||||
func (e *StatelessResetError) Temporary() bool { return true }
|
||||
|
||||
func getRole(remote bool) string {
|
||||
if remote {
|
||||
return "remote"
|
||||
}
|
||||
return "local"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue