How to redirect a port to a router using python

I am creating a python python application such as p2p instant messenger. I communicate with other peers using a TCP / IP connection. I do not want the client to perform port forwarding. When the application starts, it should check if the port is forwarded to the router if it should not forward it to the router. Is it possible to programmatically redirect a port to a router. Or how can I use port 80 for p2p communication, as it is used by browsers.

+3
source share
1 answer

You may find the message and files listed here useful. This person implemented the Nat PMP library in Python.

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

80 p2p, HTTP 80.

+1

Source: https://habr.com/ru/post/1717605/


All Articles