I would suggest this…
Maybe @Yang_Gui_Zi or @rk1951 can suggest a better route getting out of Zhongli and towards Tucheng since I’m not familiar with the area. However, pretty familiar with Tucheng onto Keelung. If you input This is a route I would take to avoid as much New Taipei and Taipei City traffic.
The worse parts are when you have to go through Xindian, Muzha and some parts of Xizhi but I assure you, it’s better than going through the heart of Taipei City.
There’s an alternative route you can once you pass the Taipei Zoo on the 106 and then climb one of the mountains to the north to hop on over to Keelung. They’re all really nice roads and mountains, but I would be sure you’re up for the extra kms and can ration your gas because there’s no gas stations on the 106.