I feel both sad & frustrated with myself when I get angry at my boys for being just like me
Don't be. It's not your job as a parent to be a friend. It's your job as a parent to make sure they turn out better than you. Don't accept behavior just because you did it too. But make you you explain the reasoning behind it in a way they would grasp and understand.