There were quite a few attacks on harbours by subs in WW2, pioneered by the Italian manned torpedo attacks on Alexandria and Gibraltar, which, inter alia, crippled two British battleships. The Brits clearly much admired this and set about developing their own forces, including a true mini-sub...