If you believe the Wackypedia the depth charge was invented in 1916.
Presumably before that a sub was more or less invulnerable once it was under ramming depth - about 30 feet of water? Towing weighted hooks seems to be quite a good idea under these circumstances - that or harpooners....
I presume that a net would be as dangerous to the surface ship as the sub, though I suspect that this was also tried, as would be a giant copy of anything else from an angler's basket...