If there are any sticks around it might help to pick one up if you see a dog you think might not be friendly. They seem to be wary of sticks.
There was a house in our old neighborhood with a couple of threatening-type dogs. I always walked (stopped running) by their place, on the opposite side of the road. Sometimes I had a stick as I went by if I saw them in the yard. I was menaced once by one (barked at/intimidated) but never bitten.
My FIL used to have a stick (piece of stained dowel, with a bullet head that he'd probably picked up in the Army, which he called his swizzle stick) that he always took with him on walks to keep dogs at bay.