You must live in a rough neighborhood. For dogs, I carry a spray made for that purpose. Never had to use it because getting off the bike and reasoning with the dog has always defused the situation. I’m mindful that more aggressive tactics, if not absolutely warranted, could lead to a confrontation with the dog’s owner. I don’t have a spray for that.