It’s literally getting too dangerous to take some exercise outdoors anymore, unless you run circles in your own fenced back yard. That really sucks. I resent the negligent people who own these dogs and fail to keep them on tight leash or secured behind sturdy high fences at all times.
Get a couple of cans of pepper spray that will spray for a good distance. The fogger type dispensers might be better for most people, although the kind that spray a skinny stream might be better for areas that are more often breezy. I prefer the kind made for defense against humans, but many like the bear sprays. Either kind will do it.
But it needs to be used before an attacking dog bites a victim, if possible. That’s when it would be most effective. Requires some steady nerve, too. The defender must be calm and focused on spraying the attacker accurately.
Concealed carry is also good for those who live where that is feasible. Don’t forget concealed carry insurance in case of a second attack by a criminal owner of an attacking dog.