获取客户端ip， 开启代理会从 X-Forwarded-For 中获取

def ip(self) -> Optional[str]:
        """
        获取客户端ip， 开启代理会从 X-Forwarded-For 中获取
        """
        ips = self.ips
        if ips and len(ips) > 0:
            return ips[0]
        if self._transport:
            return cast(
                str,
                self._transport.get_extra_info("peername"),
            )
        return None