Anonymous communication protocols are integral tools for people to exercise the right to privacy in their online activities. Such tools are urged to offer maximum protection against various classes of adversaries, including rogue criminals, exploitative companies, and authoritarian or paternalistic regimes, while respecting the diversity of users’ activities, from e-mail and web browsing to file transfer and video streaming. In such a context, lightweight anonymity protocols are a promising solution to provide well-balanced anonymity and performance for daily use against a class of adversaries with a relaxed but realistic assumption of their capability. However, as the existing instantiations of these protocols solely target software implementation, they did not fully exhibit their advantages in performance by the relaxation of the adversarial model. This paper presents P5HI, a novel instantiation and implementation of a lightweight anonymity protocol on hardware programmable switches. Its realization requires a rethinking of all aspects of the system, beginning with the realization of bit-rotation on the switch, through the construction of a cryptographic scheme and attack prevention, to hardware-friendly procedures during path setup and data transmission. We deploy the full-fledged design of the lightweight anonymity protocol on an actual programmable switch, and our prototype demonstrates its operation at a speed of over 3.0 Tbps.