I've been through a couple of experiences where I was a dog's hair away from getting bit and mauled from a couple of dogs.
My first experience was from my former JW landlady's German shepherd. I had been recently disfellowshipped (Apostasy) and had moved out of her house. I went to visit one of the only JWs who would still talk to me, also a tenant of hers, then the landlady showed up with her dog barking mad at me.
She looked at me with the most evil beatific smile and dropped her leash 5 feet in front of me. I froze; didn't twitch a muscle. The tenant I was visiting had to tell her to take control of her dog. I almost wish he would have bitten, it may have made me rich after suing her for her house.
I also got into a similar predicament as you when riding my 3 wheel recumbent from work. It's an unusual bike where you sit on a seat instead of a saddle and your butt is 8 inches off the ground.
It was night and I noticed what must have been one of the neighbors taking his dog out for a walk. When the dog owner saw me he raised the arm with which he was holding the leash and released it. I had to turn a corner fast, without tipping over (see picture) with the dog rapidly approaching me just 3 feet from my neck before I outran him. It wasn't a large dog but boy was it ferocious.
On another night when I got off from work at the same time same guy, same dog, same thing. I knew I would not be able to turn the corner again and stay ahead of him so I brought the bike to a full stop and confronted the dog by putting up a display of the most primitive rage you'll ever see in a human. I was hoping to scare him away by displaying a willingness to fight.
The dog did stop but I could see him curl up his lips, a definite warning sign, as he countered my rage with his own version.
The owner, who must have been 50 feet away from his dog, told me it was all right then called me "chicken". I guess neither him nor his canine fiend liked recumbent bicycles.
My advise is:
1) Get the most intense and largest pepper spray available. You can spray it on your legs, arms or abdomen in order to dissuade the dogs from biting you anywhere.
2) Sue the bastard who didn't keep his dogs secured.
Imagine how close to my neck this beast would have been: