Documentation
¶
Index ¶
- Constants
- func AbyssIdFromKey(pub crypto.PublicKey) (string, error)
- func NewDefaultQuicConf() *quic.Config
- func NewDefaultTlsConf(tls_identity *TLSIdentity) *tls.Config
- type AbyssPeer
- type Activity
- type BetaAddressSelector
- type BetaNetService
- func (h *BetaNetService) AppendKnownPeer(root_cert string, handshake_key_cert string) error
- func (h *BetaNetService) AppendKnownPeerDer(root_cert []byte, handshake_key_cert []byte) error
- func (h *BetaNetService) ConnectAbyssAsync(url *aurl.AURL) error
- func (h *BetaNetService) ConnectAbyst(peer_hash string) (quic.Connection, error)
- func (h *BetaNetService) GetAbyssPeerChannel() chan abyss.IANDPeer
- func (h *BetaNetService) HandlePreAccept(preaccept_handler abyss.IPreAccepter)
- func (h *BetaNetService) ListenAndServe() error
- func (h *BetaNetService) LocalAURL() *aurl.AURL
- func (h *BetaNetService) LocalIdentity() abyss.IHostIdentity
- func (h *BetaNetService) PrepareAbyssInbound(listen_ctx context.Context, connection quic.Connection)
- func (h *BetaNetService) PrepareAbyssOutbound(target *ContextedPeer, addresses []*net.UDPAddr)
- type ContextPack
- type ContextedPeer
- func (c *ContextedPeer) Activate()
- func (c *ContextedPeer) Context() context.Context
- func (c *ContextedPeer) Deactivate()
- func (c *ContextedPeer) Error() error
- func (c *ContextedPeer) Renew()
- func (p *ContextedPeer) TrySendCRR(local_session_id uuid.UUID, peer_session_id uuid.UUID, ...) bool
- func (p *ContextedPeer) TrySendJDN(peer_session_id uuid.UUID, code int, message string) bool
- func (p *ContextedPeer) TrySendJN(local_session_id uuid.UUID, path string, timestamp time.Time) bool
- func (p *ContextedPeer) TrySendJNI(local_session_id uuid.UUID, peer_session_id uuid.UUID, ...) bool
- func (p *ContextedPeer) TrySendJOK(local_session_id uuid.UUID, peer_session_id uuid.UUID, timestamp time.Time, ...) bool
- func (p *ContextedPeer) TrySendMEM(local_session_id uuid.UUID, peer_session_id uuid.UUID, timestamp time.Time) bool
- func (p *ContextedPeer) TrySendRST(local_session_id uuid.UUID, peer_session_id uuid.UUID) bool
- func (p *ContextedPeer) TrySendSJN(local_session_id uuid.UUID, peer_session_id uuid.UUID, ...) bool
- func (p *ContextedPeer) TrySendSOA(local_session_id uuid.UUID, peer_session_id uuid.UUID, ...) bool
- func (p *ContextedPeer) TrySendSOD(local_session_id uuid.UUID, peer_session_id uuid.UUID, objectIDs []uuid.UUID) bool
- type ContextedPeerMap
- func (m *ContextedPeerMap) Append(ctx context.Context, id string, peer *AbyssPeer) (*ContextedPeer, bool)
- func (m *ContextedPeerMap) Cleaner(ctx context.Context)
- func (m *ContextedPeerMap) Find(id string) (*ContextedPeer, bool)
- func (m *ContextedPeerMap) Wait(ctx context.Context, id string) (*ContextedPeer, error)
- type ContextedPeerWaiterInfo
- type PNCState
- type PeerIdentity
- type PrivateKey
- type RootSecrets
- type TLSIdentity
- type TimeoutContextGroup
Constants ¶
View Source
const ( ABYSS_ALREADY_CONNECTED = 0x0A01 ABYSS_ALREADY_CONNECTED_M = "Alrady Connected" ABYSS_EARLY_RECONNECTION = 0x0A02 ABYSS_EARLY_RECONNECTION_M = "Too Early Reconnection" )
View Source
const ACTIVE_TIMEOUT_MINUTE = time.Minute * 180
View Source
const INACTIVE_TIMEOUT_MIMUTE = time.Minute * 5
Variables ¶
This section is empty.
Functions ¶
func NewDefaultQuicConf ¶
func NewDefaultTlsConf ¶
func NewDefaultTlsConf(tls_identity *TLSIdentity) *tls.Config
Types ¶
type AbyssPeer ¶
type AbyssPeer struct {
// contains filtered or unexported fields
}
func NewAbyssPeer ¶
func NewAbyssPeer(identity PeerIdentity) *AbyssPeer
func (*AbyssPeer) HandshakeKeyCertificateDer ¶
func (*AbyssPeer) IsConnected ¶ added in v0.0.18
func (*AbyssPeer) RootCertificateDer ¶
type BetaAddressSelector ¶
type BetaAddressSelector struct {
// contains filtered or unexported fields
}
func NewBetaAddressSelector ¶
func NewBetaAddressSelector() (*BetaAddressSelector, error)
func (*BetaAddressSelector) FilterAddressCandidates ¶
func (s *BetaAddressSelector) FilterAddressCandidates(addresses []*net.UDPAddr) []*net.UDPAddr
func (*BetaAddressSelector) LocalPrivateIPAddr ¶ added in v0.0.5
func (s *BetaAddressSelector) LocalPrivateIPAddr() net.IP
func (*BetaAddressSelector) SetPublicIP ¶
func (s *BetaAddressSelector) SetPublicIP(ip net.IP)
type BetaNetService ¶
type BetaNetService struct {
// contains filtered or unexported fields
}
func NewBetaNetService ¶
func NewBetaNetService(ctx context.Context, local_private_key PrivateKey, address_selector abyss.IAddressSelector, abyst_server *http3.Server) (*BetaNetService, error)
func (*BetaNetService) AppendKnownPeer ¶
func (h *BetaNetService) AppendKnownPeer(root_cert string, handshake_key_cert string) error
func (*BetaNetService) AppendKnownPeerDer ¶
func (h *BetaNetService) AppendKnownPeerDer(root_cert []byte, handshake_key_cert []byte) error
func (*BetaNetService) ConnectAbyssAsync ¶
func (h *BetaNetService) ConnectAbyssAsync(url *aurl.AURL) error
func (*BetaNetService) ConnectAbyst ¶
func (h *BetaNetService) ConnectAbyst(peer_hash string) (quic.Connection, error)
func (*BetaNetService) GetAbyssPeerChannel ¶
func (h *BetaNetService) GetAbyssPeerChannel() chan abyss.IANDPeer
func (*BetaNetService) HandlePreAccept ¶
func (h *BetaNetService) HandlePreAccept(preaccept_handler abyss.IPreAccepter)
func (*BetaNetService) ListenAndServe ¶
func (h *BetaNetService) ListenAndServe() error
func (*BetaNetService) LocalAURL ¶
func (h *BetaNetService) LocalAURL() *aurl.AURL
func (*BetaNetService) LocalIdentity ¶
func (h *BetaNetService) LocalIdentity() abyss.IHostIdentity
func (*BetaNetService) PrepareAbyssInbound ¶
func (h *BetaNetService) PrepareAbyssInbound(listen_ctx context.Context, connection quic.Connection)
func (*BetaNetService) PrepareAbyssOutbound ¶
func (h *BetaNetService) PrepareAbyssOutbound(target *ContextedPeer, addresses []*net.UDPAddr)
type ContextPack ¶ added in v0.0.18
type ContextPack struct {
// contains filtered or unexported fields
}
type ContextedPeer ¶ added in v0.0.18
type ContextedPeer struct {
*AbyssPeer
// contains filtered or unexported fields
}
func (*ContextedPeer) Activate ¶ added in v0.0.18
func (c *ContextedPeer) Activate()
func (*ContextedPeer) Context ¶ added in v0.0.18
func (c *ContextedPeer) Context() context.Context
func (*ContextedPeer) Deactivate ¶ added in v0.0.18
func (c *ContextedPeer) Deactivate()
func (*ContextedPeer) Error ¶ added in v0.0.18
func (c *ContextedPeer) Error() error
func (*ContextedPeer) Renew ¶ added in v0.0.18
func (c *ContextedPeer) Renew()
func (*ContextedPeer) TrySendCRR ¶ added in v0.0.18
func (p *ContextedPeer) TrySendCRR(local_session_id uuid.UUID, peer_session_id uuid.UUID, member_sessions []abyss.ANDPeerSessionIdentity) bool
func (*ContextedPeer) TrySendJDN ¶ added in v0.0.18
func (*ContextedPeer) TrySendJNI ¶ added in v0.0.18
func (p *ContextedPeer) TrySendJNI(local_session_id uuid.UUID, peer_session_id uuid.UUID, member_session abyss.ANDPeerSessionWithTimeStamp) bool
func (*ContextedPeer) TrySendJOK ¶ added in v0.0.18
func (*ContextedPeer) TrySendMEM ¶ added in v0.0.18
func (*ContextedPeer) TrySendRST ¶ added in v0.0.18
func (*ContextedPeer) TrySendSJN ¶ added in v0.0.18
func (p *ContextedPeer) TrySendSJN(local_session_id uuid.UUID, peer_session_id uuid.UUID, member_sessions []abyss.ANDPeerSessionIdentity) bool
func (*ContextedPeer) TrySendSOA ¶ added in v0.0.18
func (p *ContextedPeer) TrySendSOA(local_session_id uuid.UUID, peer_session_id uuid.UUID, objects []abyss.ObjectInfo) bool
func (*ContextedPeer) TrySendSOD ¶ added in v0.0.18
type ContextedPeerMap ¶ added in v0.0.18
type ContextedPeerMap struct {
// contains filtered or unexported fields
}
func NewContextedPeerMap ¶ added in v0.0.18
func NewContextedPeerMap() *ContextedPeerMap
func (*ContextedPeerMap) Append ¶ added in v0.0.18
func (m *ContextedPeerMap) Append(ctx context.Context, id string, peer *AbyssPeer) (*ContextedPeer, bool)
func (*ContextedPeerMap) Cleaner ¶ added in v0.0.18
func (m *ContextedPeerMap) Cleaner(ctx context.Context)
func (*ContextedPeerMap) Find ¶ added in v0.0.18
func (m *ContextedPeerMap) Find(id string) (*ContextedPeer, bool)
func (*ContextedPeerMap) Wait ¶ added in v0.0.18
func (m *ContextedPeerMap) Wait(ctx context.Context, id string) (*ContextedPeer, error)
type ContextedPeerWaiterInfo ¶ added in v0.0.18
type ContextedPeerWaiterInfo struct {
// contains filtered or unexported fields
}
type PeerIdentity ¶
type PeerIdentity struct {
// contains filtered or unexported fields
}
func NewPeerIdentity ¶
func NewPeerIdentity(root_self_cert []byte, handshake_key_cert []byte) (*PeerIdentity, error)
func (*PeerIdentity) EncryptHandshake ¶
func (p *PeerIdentity) EncryptHandshake(payload []byte) ([]byte, error)
func (*PeerIdentity) IDHash ¶
func (p *PeerIdentity) IDHash() string
func (*PeerIdentity) VerifyTLSBinding ¶
func (p *PeerIdentity) VerifyTLSBinding(abyss_bind_cert *x509.Certificate, tls_cert *x509.Certificate) error
type PrivateKey ¶
type RootSecrets ¶
type RootSecrets struct {
// contains filtered or unexported fields
}
func NewRootIdentity ¶
func NewRootIdentity(root_private_key PrivateKey) (*RootSecrets, error)
To generate root key, use ed25519.GenerateKey(rand.Reader)
func (*RootSecrets) DecryptHandshake ¶
func (r *RootSecrets) DecryptHandshake(body []byte) ([]byte, error)
func (*RootSecrets) HandshakeKeyCertificate ¶
func (r *RootSecrets) HandshakeKeyCertificate() string
func (*RootSecrets) IDHash ¶
func (r *RootSecrets) IDHash() string
func (*RootSecrets) NewTLSIdentity ¶
func (r *RootSecrets) NewTLSIdentity() (*TLSIdentity, error)
func (*RootSecrets) RootCertificate ¶
func (r *RootSecrets) RootCertificate() string
type TLSIdentity ¶
type TLSIdentity struct {
// contains filtered or unexported fields
}
type TimeoutContextGroup ¶ added in v0.0.18
type TimeoutContextGroup struct {
// contains filtered or unexported fields
}
func NewTimeoutContextGroup ¶ added in v0.0.18
func NewTimeoutContextGroup() *TimeoutContextGroup
func (*TimeoutContextGroup) Cleaner ¶ added in v0.0.18
func (g *TimeoutContextGroup) Cleaner(ctx context.Context, timeout time.Duration)
func (*TimeoutContextGroup) Instanciate ¶ added in v0.0.18
func (g *TimeoutContextGroup) Instanciate(background_ctx context.Context) (context.Context, func())
Click to show internal directories.
Click to hide internal directories.