Question

I am building python p2p application like p2p instant messenger. I am communicating with other peers using TCP/IP connection. I do not want client to do port forwarding. When application starts it should check whether port is forwarded to router if not it should forward it to router. Is it possible to programaticaly forward the port to router. Or how can I use port 80 for p2p communication as its used by browsers.

Was it helpful?

Solution

You may find the post and files listed here helpful. This person implemented a Nat PMP library in Python.

http://blog.yimingliu.com/2008/01/07/nat-pmp-client-library-for-python/

If you want to use port 80 for p2p communication, you will simply just need to write your own protocol in HTTP and connect over port 80.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top