async def get_peer_info(self) -> Optional[PeerInfo]:
    ip = None
    port = self._port
    try:
        async with ClientSession() as session:
            async with session.get('https://checkip.amazonaws.com/') as resp:
                if (resp.status == 200):
                    ip = str((await resp.text()))
                    ip = ip.rstrip()
    except Exception:
        ip = None
    if (ip is None):
        return None
    peer = PeerInfo(ip, uint16(port))
    if (not peer.is_valid()):
        return None
    return peer
async def get_peer_info(self) -> Optional[PeerInfo]:
    ip = None
    port = self._port
    try:
        async with ClientSession() as session:
            async with session.get('https://checkip.amazonaws.com/') as resp:
                if (resp.status == 200):
                    ip = str((await resp.text()))
                    ip = ip.rstrip()
    except Exception:
        ip = None
    if (ip is None):
        return None
    peer = PeerInfo(ip, uint16(port))
    if (not peer.is_valid()):
        return None
    return peer