How can stop watching pornographic?

I need some advice, I am struggling with my addiction to porn. I want to be freed from these sins. But my friends always went to my house and watched those unpleasant scenes. I want him also to stop doing that kind of thing. But I am afraid that he misunderstood me and also avoid me. I don’t want to lose him because he’s my only friend.
I tried so hard to overcome this addiction.
Please give me some advice.