def setup_xray_client(self, ip, port, client):
        """
        Setup the xray client based on ip and port.
        If a preset client is specified, ip and port
        will be ignored.
        """
        if not client:
            client = self._create_xray_client(ip, port)
        self._xray_client = client
Setup the xray client based on ip and port.
        If a preset client is specified, ip and port
        will be ignored.