Versions in this module Expand all Collapse all v0 v0.1.0 Jun 22, 2023 Changes in this version + const ID + type KnockingTLSTransport struct + func NewKnockingTLS(logger commontypes.Logger, myPrivKey p2pcrypto.PrivKey, ...) (*KnockingTLSTransport, error) + func (c *KnockingTLSTransport) SecureInbound(ctx context.Context, insecure net.Conn) (sec.SecureConn, error) + func (c *KnockingTLSTransport) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (sec.SecureConn, error) + func (c *KnockingTLSTransport) UpdateAllowlist(allowlist []peer.ID) + type Limiters struct + func NewLimiters(logger commontypes.Logger) *Limiters + func (ls *Limiters) Find(peerID p2ppeer.ID) (*rate.Limiter, bool) + func (ls *Limiters) Get() map[p2ppeer.ID]refCountLimiterArgs + func (ls *Limiters) IncreaseLimits(peerIDs []p2ppeer.ID, deltaTokenBucketRefillRate int64, ...) + func (ls *Limiters) String() string + type RateLimitedConn struct + func NewRateLimitedConn(conn net.Conn, bandwidthLimiter *rate.Limiter, logger commontypes.Logger) *RateLimitedConn + func (r *RateLimitedConn) EnableRateLimiting() + func (r *RateLimitedConn) Read(b []byte) (n int, err error)