Well, believe it or not, spraying diluted vinegar can really stop dogs from approaching.
It doesn't mean that you should spray them even they do not get close to you/attack you, it's just a way of self defense while the least to casue damage.
Other normal ways to deal with:
(1) bring along long stick - not to hit them, but to avoid dogs directly give you a bite on hand
(2) hit them on the nose (noses are their most fragile part, but NEVER try this if you are not a pro, or else your hand may be injured)
(3) dog repeller (驅狗器) - by using high frequency to scare off dogs
(4) act normally - actually most dogs will not attack people even you don't feed them, but they may attack you if you act weird