mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
* feat: base implementation of dcutr for hole-punching * chore: removed circuit-relay imports from __init__ * feat: implemented dcutr protocol * added test suite with mock setup * Fix pre-commit hook issues in DCUtR implementation * usages of CONNECT_TYPE and SYNC_TYPE have been replaced with HolePunch.Type.CONNECT and HolePunch.Type.SYNC * added unit tests for dcutr and nat module and * added multiaddr.get_peer_id() with proper DNS address handling and fixed method signature inconsistencies * added assertions to verify DCUtR hole punch result in integration test --------- Co-authored-by: Manu Sheel Gupta <manusheel.edu@gmail.com>
47 lines
869 B
Python
47 lines
869 B
Python
"""
|
|
Circuit Relay v2 implementation for libp2p.
|
|
|
|
This package implements the Circuit Relay v2 protocol as specified in:
|
|
https://github.com/libp2p/specs/blob/master/relay/circuit-v2.md
|
|
"""
|
|
|
|
from .dcutr import (
|
|
DCUtRProtocol,
|
|
)
|
|
from .dcutr import PROTOCOL_ID as DCUTR_PROTOCOL_ID
|
|
|
|
from .nat import (
|
|
ReachabilityChecker,
|
|
is_private_ip,
|
|
)
|
|
|
|
from .discovery import (
|
|
RelayDiscovery,
|
|
)
|
|
from .protocol import (
|
|
PROTOCOL_ID,
|
|
CircuitV2Protocol,
|
|
)
|
|
from .resources import (
|
|
RelayLimits,
|
|
RelayResourceManager,
|
|
Reservation,
|
|
)
|
|
from .transport import (
|
|
CircuitV2Transport,
|
|
)
|
|
|
|
__all__ = [
|
|
"CircuitV2Protocol",
|
|
"PROTOCOL_ID",
|
|
"RelayLimits",
|
|
"Reservation",
|
|
"RelayResourceManager",
|
|
"CircuitV2Transport",
|
|
"RelayDiscovery",
|
|
"DCUtRProtocol",
|
|
"DCUTR_PROTOCOL_ID",
|
|
"ReachabilityChecker",
|
|
"is_private_ip",
|
|
]
|