Files
py-libp2p/libp2p/relay/circuit_v2/pb/dcutr_pb2.pyi
Soham Bhoir cb11f076c8 feat/606-enable-nat-traversal-via-hole-punching (#668)
* 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>
2025-08-07 19:00:16 -06:00

55 lines
1.7 KiB
Python

"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import typing
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
@typing.final
class HolePunch(google.protobuf.message.Message):
"""HolePunch message for the DCUtR protocol."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
class Type(builtins.int):
"""Message types for HolePunch"""
@builtins.classmethod
def Name(cls, number: builtins.int) -> builtins.str: ...
@builtins.classmethod
def Value(cls, name: builtins.str) -> 'HolePunch.Type': ...
@builtins.classmethod
def keys(cls) -> typing.List[builtins.str]: ...
@builtins.classmethod
def values(cls) -> typing.List['HolePunch.Type']: ...
@builtins.classmethod
def items(cls) -> typing.List[typing.Tuple[builtins.str, 'HolePunch.Type']]: ...
CONNECT: HolePunch.Type # 100
SYNC: HolePunch.Type # 300
TYPE_FIELD_NUMBER: builtins.int
OBSADDRS_FIELD_NUMBER: builtins.int
type: HolePunch.Type
@property
def ObsAddrs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ...
def __init__(
self,
*,
type: HolePunch.Type = ...,
ObsAddrs: collections.abc.Iterable[builtins.bytes] = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["type", b"type"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["ObsAddrs", b"ObsAddrs", "type", b"type"]) -> None: ...
global___HolePunch = HolePunch