Imagine the scene ... you are leash walking your dog on a quiet street, no one else is around, when all of a sudden, a snarling dog comes running out of nowhere straight at you, and is fixing on your poor, dear Fido. Although terrible, this is actually not that uncommon, dogs unlatch gates, or people forget to turn on the electric fence or dogs just run out of the door when no one is looking.
The streets seem to be full of dogs that aren't under close control, and of course there is always the chance that one of them might be aggressive. What to do? Well, as the old wives tale goes, an ounce of prevention is worth a pound of cure, so my best advice to you is to get tooled up, ready for an onslaught, in case it should happen.
Being prepared means you will automatically have more confidence, and dogs take far more notice of anyone with confidence. I carry a bear spray with me when I go out into the great blue yonder with my dogs. I have never had to use it, but I have been faced more times than I can count with a small pack of coyotes, and the confidence of having that bear spray in my fanny pack was worth a million bucks. Each time, I felt like Zena Warrior Princess, ready to take on the world, and drew myself to my tallest height, squared out my shoulders and owned every inch of the sky in that moment. The intent and the energy about me must have been terrifying because they all looked at each other and ran off quickly. One can only get such strength from being prepared and thus being confident.
The second thing I recommend is to carry a tennis racquet. This is not to beat balls into any oncoming dogs (my aim would never be good enough anyway!), but to use as a blocking tool. We use a tennis racquet quite a lot at the ranch when we need to grant space to a dog who feels threatened by space invader dogs. We had a young red nose pit bull, Hudson, here for rehab a short while ago, who was very threatened by the closeness of strange dogs -- his comfort level was about six feet at first. We used the tennis racquet to slow down and eventually block the approach of the "space invader" while Hudson got gradually more comfortable with the nearness of strangers. The humble tennis racquet is great because it is big -- an effective visual block and makes your arm 18 inches longer, so you own more space. We never, ever touch the dogs with it, it isn't a weapon, just a blocking device. In a tense situation such as we are talking about, with your dog potentially being attacked, I would suggest you put your dog behind you, take a step towards the oncoming dog, draw yourself up to your full height height and block his approach with the tennis racquet, not touching him but claiming the space in front of him with it.
Most bullies back down when they realise a stronger character is in charge of the situation. Let's face it, if you are faced with a 75-pound dog who can run at 30 miles an hour, has huge gnashers and fancies your dog for his dinner, you can't outrun him or fight him -- the dog is going to win every time. So, you use your mental capacity, your will and your energy to outwit him, and then you back it up with these tools if the you-know-what hits the fan.
At the ranch I work hands on, off leash, with aggressive dogs every week and I always start from a point of mental superiority and claiming my space. I never bully, but I won't be bullied either. Taking one step forward and stopping isn't an intent to attack, it merely shows the dog that he must come no further and is a VERY powerful tool.
Another tool I recommend is an air horn, the small ones are pretty tiny and fit neatly into a pocket. California behaviourist and author Nicole Wilde recommended this to me years ago, knowing that I walk my dogs off leash on empty building land, and not two weeks after she did so, I came face to face with a pack of three coyotes who were eyeing my schnauzer mix, Noodle, from about 50 feet away. I called all my dogs to me, leashed them all, and then blew the airhorn as hard as I could. Two wonderful things happened -- the coyotes ran off and people started coming out of their houses to see what all the noise was! Had I been on my own in the midst of a dog attack, that alone would have been a life saver!
Lastly, remember that leash laws are here to protect us from irresponsible owners...if you are forced to protect yourself and your dog because someone didn't bother to control their dog, please don't feel guilty if you cause some damage. Your first duty of care is to protect your dog and yourself, explaining to someone why you felt you had to temporarily blind their dog is a whole lot easier than burying your own.