It's not illegal. The National Regulations on the Management of Internet Cafes only restricts primary and secondary schools and residential buildings, and universities are not among them.
Ninth secondary schools and primary schools within 200 meters around the campus and residential buildings (hospitals) shall not set up Internet service business premises.