Dreams are self-created, symbolic reflections of your feelings, thoughts and awarenesses about your waking life. Your dream clearly reflects your concern about your friend and her relationship with her ex, not that he will do what you dreamed literally, but how you feel he has or will treat her symbolically. The symbols in your dream tell the story. Here are links to their definitions on this website:
darkness:
dreamdoctor.com/dream-dictionary/definitions/darkness.html
strangling:
dreamdoctor.com/dream-dictionary/definitions/strangling.html
gun:
dreamdoctor.com/dream-dictionary/definitions/gun.html
shot:
dreamdoctor.com/dream-dictionary/definitions/shot.html
blood:
dreamdoctor.com/dream-dictionary/definitions/blood.html
Your dream reflects your awareness of the ex's anger and your concern about the emotional injury he will, has or might do to your friend and even you, perhaps because you have stood by her or defend her(?) The ex comes out of the darkness because, symbolically, you really don't know where he's coming from. His strangling of her in the dream reflects your sense that he wants to "choke off" what she might be saying about him. The fact that he doesn't pretends to shoot your friend may reflect your awareness that he wouldn't really hurt her. However, when he turns the gun on you and shoots, that suggests that you are concerned that he might be able to do you some emotional injury, which might range from dissing you with his friends to being spiteful for supporting your friend. As the dreamer, only you will know for sure.
Your dream is a wake up call to protect yourself emotionally from the fallout resulting from your friend's breakup with her ex.
Hope that helps!