package openvpn

import E "github.com/sagernet/sing/common/exceptions"

var (
	ErrMissingServer               = E.New("missing openvpn server")
	ErrMissingListenAddress        = E.New("missing openvpn listen address")
	ErrUnsupportedProtocol         = E.New("unsupported openvpn protocol")
	ErrUnsupportedMode             = E.New("unsupported openvpn mode")
	ErrHandshakeTimeout            = E.New("control handshake timeout")
	ErrNoPushReply                 = E.New("server did not reply to push requests")
	ErrDataChannelNotReady         = E.New("data channel is not ready")
	ErrClientClosed                = E.New("client is closed")
	ErrServerClosed                = E.New("server is closed")
	ErrPeerNotFound                = E.New("peer not found")
	ErrMissingStaticKey            = E.New("missing openvpn static key")
	ErrCompressionNotSupported     = E.New("unsupported compression option")
	ErrOptionNotSupported          = E.New("option is not supported yet")
	ErrAuthenticationFailed        = E.New("authentication failed")
	ErrServerRestart               = E.New("server requested restart")
	ErrServerHalt                  = E.New("server halted session")
	ErrServerExit                  = E.New("server exited")
	ErrPeerExit                    = E.New("peer exited")
	ErrPeerRestart                 = E.New("peer started a new hard-reset session")
	ErrPeerCertificateVerification = E.New("peer certificate verification failed")
	ErrPeerCertificateRevoked      = E.New("peer certificate is revoked")
	ErrPeerCertificateExtUsage     = E.New("peer certificate is missing required extended key usage")
	ErrPeerCertificateKeyUsage     = E.New("peer certificate is missing required key usage")
	ErrPeerCertificateNSCertType   = E.New("peer certificate fails ns-cert-type check")
	ErrPeerCertificateName         = E.New("peer certificate fails verify-x509-name check")
	ErrPeerCertificatePurpose      = E.New("unsuitable certificate purpose")
	ErrCRLSignatureInvalid         = E.New("CRL signature not issued by a trusted CA")
	ErrCRLExpired                  = E.New("CRL is outside its validity window")
	ErrCRLUnavailable              = E.New("no CRL in the --crl-verify file covers a certificate in the chain")
	ErrCRLIssuerKeyUsage           = E.New("CRL issuer certificate is not allowed to sign CRLs")
	ErrPullFilterRejected          = E.New("pushed option rejected by pull-filter")
	ErrCompressionPushRejected     = E.New("pushed compression rejected")
	ErrCipherNegotiationFailed     = E.New("cipher negotiation failed with peer")
	ErrRenegotiationRequired       = E.New("data channel reached renegotiation threshold")
	ErrIPPoolExhausted             = E.New("server ifconfig pool is exhausted")
	ErrRouteNotFound               = E.New("route not found")
	ErrInvalidIPPacket             = E.New("invalid ip packet")
	ErrPingRestartTimeout          = E.New("ping-restart timeout")
	ErrPingExitTimeout             = E.New("ping-exit timeout")
	ErrNoPendingChallenge          = E.New("no pending openvpn challenge")
	ErrChallengeNotAnswerable      = E.New("challenge does not accept a response")
	ErrChallengeCanceled           = E.New("authentication challenge canceled")
	ErrAuthPendingTimeout          = E.New("pending authentication timed out")
	ErrInactiveTimeout             = E.New("inactive timeout")
	ErrSessionTimeout              = E.New("session timeout")
	ErrRemoteAddressExhausted      = E.New("remote address list exhausted")
	ErrServerResourceLimit         = E.New("server resource limit reached")
	ErrFatalDecryption             = E.New("fatal decryption error")
)
