If you're worried about off-leash or otherwise unfriendly dogs approaching you, try using clear and loud commands such as "sit," get an object between you, stay still and calm, and avoid eye contact as much as possible.