def METHOD_NAME(self, clientsock: Union[socket.socket, paramiko.Channel]) -> Optional[Tuple[str, int]]:
    """Ermittelt das Ziel aus der Socks Anfrage"""
    # get socks command
    try:
        command = Socks4Command(clientsock.recv(1))
    except ValueError as exc:
        raise Socks4Error("Invalid Socks4 command") from exc
    dst_addr_b: bytes
    dst_addr: str
    dst_port_b: bytes
    dst_port: int
    dst_port_b, dst_addr_b = clientsock.recv(2), clientsock.recv(4)
    if len(dst_addr_b) != 4 or len(dst_port_b) != 2:
        raise Socks4Error("Invalid IPv4 Address")
    dst_addr = ".".join([str(i) for i in dst_addr_b])
    dst_port = dst_port_b[0] * 256 + dst_port_b[1]
    continue_recv = True
    userid = b""
    while continue_recv:
        nextchr = clientsock.recv(1)
        if nextchr == b"\x00":
            break
        userid += nextchr
    address: Optional[Tuple[str, int]] = None
    reply = Socks4CommandReply.FAILED
    if command is Socks4Command.CONNECT:
        address = (dst_addr, dst_port)
        reply = Socks4CommandReply.SUCCESS
    clientsock.sendall(
        b"\x00"
        + reply
        + self.server_port
        + self.server_ip
    )
    return address