src/Request.php
public function rawIp(): string
    {
        //依序检查
        foreach (['REMOTE_ADDR', 'HTTP_X_FORWARDED_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP'] as $k) {
            if (isset($_SERVER[$k]) and $_SERVER[$k]) return $_SERVER[$k];
        }

        return '0.0.0.0';
    }
public function rawIp(): string
    {
        //依序检查
        foreach (['REMOTE_ADDR', 'HTTP_X_FORWARDED_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP'] as $k) {
            if (isset($_SERVER[$k]) and $_SERVER[$k]) return $_SERVER[$k];
        }

        return '0.0.0.0';
    }
获取请示中的原始IP信息,如果通过CDN,可能是多段的
@return string