Dogs chase things that move, if you stand still and make no eye contact they are unlikely to approach you unless it is to sniff.

Tell your friends to look up dog behaviour online. You and they are very ill informed about animal behaviour whether they are strays or not from the comments you have made.

However, failing educating yourselves, carry a spray bottle with lemon juice and water. Spray the offending animals when they are within 1 meter or so. They will learn to avoid them without being harmed.