for a project I wanted to create a peer2peer chat program that encrypts the data that's being sent, of course my first thought was to use socket programming (I'm using python). But after I created a program that succesfully sends and encrypts messages I've found out you have to manually activate port forwarding on your router to be able to use socket programming on public IPs. Since that is not an optimal choice for me I tried to find a second way, then I found out about localtunnel, which helps you share your port from localhost without having to change your router settings.
The thing is, it's on network layer and I can't use socket programming to build a chat application on top of it, what can I do? Can I use https requests or any other method to use localtunnel as an intermediary or is there any other methods I can follow to make a simpler socket programming application that works on public IPs?
I'm totally lost and in need of dire help.