I found lots of rather nasty dogs while I was cycling (often uphill) in Romania.
No solution other than pedal faster. Never got bitten though. My rule of thumb is: "If the dog is barking and chasing you, it is too busy to try to bite you." That should make you breathe easier. The scary dogs are the ones that you cannot hear.
Good luck!