Free-roaming dogs, otherwise known as dogs at large or strays are a public safety issue. Strays can be sick, aggressive and territorial and without an owner present there is no one to keep them from hurting you, your dog or just being a nuisance. For your safety and theirs a few different things are necessary.
When you are walking in areas that don't have many people around, make sure to carry a cell-phone. Always report loose dogs, whether they've shown aggression or not. The thing to remember here is that even if a stray acts friendly and loving it isn't healthy for them or others to let them remain on their own. By reporting them you help keep the feral packs controlled which decreases the chances of rabid strays, random' attacks and property destruction.
Bring a small first aid kit and an air-horn. Air horns are an effective deterrent in most cases. The sound is loud and shrill which will cause all but the raving to back off fairly quick. The first aid kit can be used to administer on-site wound care if you are bitten and cannot get to the doctor immediately . The key thing to remember here is that you cannot run from a dog. When you are faced with an approaching stray the best thing you can do is to stand still and lay claim to your space. Stand tall and visualize being larger than you are. Don't make eye contact and don't move away.
Most importantly do not allow yourself to be surrounded or cornered. Most dogs when faced with a strong, dominant' human brandishing an air-horn will give way. By holding yourself like you are the baddest thing on two legs you send forth the energy of being dominant. Claiming your space while walking or cycling doesn't mean that you should go looking for feral dogs to prove yourself against. When you possibly can, avoid areas with large numbers of dogs at large. Prevention is the best defense against a dog attack.
Know your area, know the dangers and risks that go along with that territory. The more you know about the situation before you get into it the better off you are going to be. Following a live and let live' philosophy while actually in the area while reporting the free-roaming dogs will help make the walking path safer for you and those who follow.