A faucet having a bent tube and metal housing. The faucet comprises a water passage pipe (6), a connector (7), an aerator (8). A metal housing of the faucet is on a sink, and directly protects an internal structure including water pipes and an aerator base. A sensing head portion (9) is provided at a front end of the aerator (8). A sensing wire (10) connects the sensing head portion (9) and electronic components. A water flow power generator (19), a battery electronic board (18), and a solenoid valve (16) are located under the water sink. The aerator is made of a food-grade plastic material. A water flow is used to generate power for a smart infrared sensing solenoid valve. The present invention avoids using complicated overall structures of existing faucets, achieves the purpose of preventing a metal faucet from creating a heavy metal precipitation problem, and provides smart applications. Furthermore, a water flow is used to generate power, such that neither an additional power supply nor battery replacement is required. The faucet has a simplified structure, is easy and convenient to manufacture, and has low manufacturing costs.