There is a port that I want open to the outside. By default, on the computer all ports are open, but outside of their blocking 1 or 2 routers(with UPnP support — otherwise how would Skype work, or torrent?).
Accordingly, it is not clear — what has to be done in code, not to do the port forwarding on the router, and the port, which is expected to connect from the outside, has been opened(was proposalsa) itself.
oswaldo_Schulist answered on October 8th 19 at 03:00
For example here (miranda-upnp) to see how it works. In downloads/ have readme.html which shows how to create a portmappinga.
And then you can use this library (pyupnp) to implement the portmappinga in the program.