In answers to a recent question, ultrasonic dog repellers were suggested as a means of self defence against stray dogs rather than weapons. I'm also concerned with loose farm dogs, and live somewhere with very strict weapons laws (so bear spray is out of the question). A trekking pole I or kayak paddle may have some value in fending off a dog but are rather unwieldy if you're on a bike (for example). The omnidirectional sort are what I have in mind, as they could be clipped to gear/taped to handlebars and used immediately.
Most of what I can find online is arguments for and against using them to train or discipline your own dog or a noisy nuisance dog. So do they work for stopping (feral) dogs from approaching? Do they make dogs back off?