If this situation occurs on my own property (and the territory of my dog) then it is a different ballgame.
First of all, if you are on my property, you are uninvited. You have no business being there. My dog is a team member: one of his primary jobs is the protection of me and my property. If you are on my property and my dog comes after you (which he will) he is doing his job. He is doing the job I want him to do, and he is doing the job he has been bred to do for hundreds of years. If you then produce a gun and shoot my dog, I MUST assume that you are a threat not only to my dog, but also to me. I consider my dog to be my first line of defense but if I am home, I am his back-up. In other words, the dog is only one of your problems.
I have actually had to test this whole senario out: twice. One was a home invasion and the other was a break-in of my pick-up truck. Both times the dog handled the situation more than adequately.
If you come on my property, don't worry about me restraining my dog: he lives here. You better worry about restraining yourself from trespassing: or, you will regret it.
All that being said, my dog is seldom outside although when he is, he is unrestrained. I am watching him the whole time which amounts to maybe twenty minutes a day spread out over two sessions. And my dog will break off a full charge on my command. Again, I have tested this in more than one real situation. My dog also will not leave my yard. When I moved here I took the dog out every day and walked him on a leash around my property line. When he was off-leash I scolded him whenever he thought about going off my property. Now, for the last 4-5 years, he has never left the yard (2 1/2 acres).