In the latter part of the Qing dynasty, Tanshui was the largest port in Taiwan, and was the "customs headquarters," also charged with overseeing port activities at Keelung, Tainan, and Kaohsiung.
清末曾是台灣第一大港的淡水，還兼負「總關」的任務，管轄著基隆、台南、高雄等三個外口。