Documentation ¶
Index ¶
- Constants
- func META_HEADER() []byte
- type AllowList
- type ConnClosedByDeduplicatorError
- type ConnResult
- type ConnTimeoutError
- type InapplicableProxyTypeError
- type InvalidUriError
- type IvalidPeerPublicKey
- type ProtoVersion
- type Transport
- type TransportListener
- type TransportSecurityCheckError
- type UnacceptableAddressError
- type UnknownProtoError
- type UnknownProtoVersionError
- type UnknownSchemeError
Constants ¶
View Source
const ( SECURE_LVL_UNSECURE uint = 0 SECURE_LVL_ENCRYPTED = 1 SECURE_LVL_VERIFIED = 2 SECURE_LVL_ENCRYPTED_AND_VERIFIED = 3 )
Variables ¶
This section is empty.
Functions ¶
func META_HEADER ¶
func META_HEADER() []byte
Types ¶
type ConnClosedByDeduplicatorError ¶
type ConnClosedByDeduplicatorError struct{}
func (ConnClosedByDeduplicatorError) Error ¶
func (e ConnClosedByDeduplicatorError) Error() string
func (ConnClosedByDeduplicatorError) Temporary ¶
func (e ConnClosedByDeduplicatorError) Temporary() bool
func (ConnClosedByDeduplicatorError) Timeout ¶
func (e ConnClosedByDeduplicatorError) Timeout() bool
type ConnResult ¶
type ConnTimeoutError ¶
type ConnTimeoutError struct{}
func (ConnTimeoutError) Error ¶
func (e ConnTimeoutError) Error() string
func (ConnTimeoutError) Temporary ¶
func (e ConnTimeoutError) Temporary() bool
func (ConnTimeoutError) Timeout ¶
func (e ConnTimeoutError) Timeout() bool
type InapplicableProxyTypeError ¶
func (InapplicableProxyTypeError) Error ¶
func (e InapplicableProxyTypeError) Error() string
func (InapplicableProxyTypeError) Temporary ¶
func (e InapplicableProxyTypeError) Temporary() bool
func (InapplicableProxyTypeError) Timeout ¶
func (e InapplicableProxyTypeError) Timeout() bool
type InvalidUriError ¶
type InvalidUriError struct {
Err string
}
func (InvalidUriError) Error ¶
func (e InvalidUriError) Error() string
func (InvalidUriError) Temporary ¶
func (e InvalidUriError) Temporary() bool
func (InvalidUriError) Timeout ¶
func (e InvalidUriError) Timeout() bool
type IvalidPeerPublicKey ¶
type IvalidPeerPublicKey struct {
Text string
}
func (IvalidPeerPublicKey) Error ¶
func (e IvalidPeerPublicKey) Error() string
func (IvalidPeerPublicKey) Temporary ¶
func (e IvalidPeerPublicKey) Temporary() bool
func (IvalidPeerPublicKey) Timeout ¶
func (e IvalidPeerPublicKey) Timeout() bool
type ProtoVersion ¶
func PROTO_VERSION ¶
func PROTO_VERSION() ProtoVersion
Because there are no constants structures in go
func (ProtoVersion) String ¶
func (e ProtoVersion) String() string
type Transport ¶
type Transport interface { GetScheme() string Connect(ctx context.Context, uri url.URL, proxy *url.URL, key ed25519.PrivateKey) (ConnResult, error) Listen(ctx context.Context, uri url.URL, key ed25519.PrivateKey) (TransportListener, error) }
type TransportListener ¶
type TransportListener interface { // Accept waits for and returns the next connection to the listener. Accept() (net.Conn, error) // Accept waits for and returns the next connection with optional transport key to the listener. AcceptConn() (ConnResult, error) // Close closes the listener. // Any blocked Accept operations will be unblocked and return errors. Close() error // Addr returns the listener's network address. Addr() net.Addr }
func ListenerToTransportListener ¶
func ListenerToTransportListener(linstener net.Listener, secLvl uint) TransportListener
type TransportSecurityCheckError ¶
func (TransportSecurityCheckError) Error ¶
func (e TransportSecurityCheckError) Error() string
func (TransportSecurityCheckError) Temporary ¶
func (e TransportSecurityCheckError) Temporary() bool
func (TransportSecurityCheckError) Timeout ¶
func (e TransportSecurityCheckError) Timeout() bool
type UnacceptableAddressError ¶
type UnacceptableAddressError struct {
Text string
}
func (UnacceptableAddressError) Error ¶
func (e UnacceptableAddressError) Error() string
func (UnacceptableAddressError) Temporary ¶
func (e UnacceptableAddressError) Temporary() bool
func (UnacceptableAddressError) Timeout ¶
func (e UnacceptableAddressError) Timeout() bool
type UnknownProtoError ¶
type UnknownProtoError struct{}
func (UnknownProtoError) Error ¶
func (e UnknownProtoError) Error() string
func (UnknownProtoError) Temporary ¶
func (e UnknownProtoError) Temporary() bool
func (UnknownProtoError) Timeout ¶
func (e UnknownProtoError) Timeout() bool
type UnknownProtoVersionError ¶
type UnknownProtoVersionError struct { Expected ProtoVersion Received ProtoVersion }
func (UnknownProtoVersionError) Error ¶
func (e UnknownProtoVersionError) Error() string
func (UnknownProtoVersionError) Temporary ¶
func (e UnknownProtoVersionError) Temporary() bool
func (UnknownProtoVersionError) Timeout ¶
func (e UnknownProtoVersionError) Timeout() bool
type UnknownSchemeError ¶
type UnknownSchemeError struct {
Scheme string
}
func (UnknownSchemeError) Error ¶
func (e UnknownSchemeError) Error() string
func (UnknownSchemeError) Temporary ¶
func (e UnknownSchemeError) Temporary() bool
func (UnknownSchemeError) Timeout ¶
func (e UnknownSchemeError) Timeout() bool
Click to show internal directories.
Click to hide internal directories.