Zeronet: Please delete UPnP forwards when zeronet exits gracefully

Created on 24 May 2016  路  4Comments  路  Source: HelloZeroNet/ZeroNet

I just stopped it with Ctrl-C and it left UPnP forwards.

enhancement help wanted

Most helpful comment

Quick update on this: finally got around to working on this. Currently adding some tests, then will refactor a few odd bits, and finally add code to signal the router to delete a port mapping.

All 4 comments

Hey @HelloZeroNet , looks like something I could check out in the next few days/weeks :)

miniupnpc https://github.com/miniupnp/miniupnp/tree/master/miniupnpc both creates UPnP forward, and deletes it successfully. Maybe you should just switch to this library, instead of doing it manually.

@yurivict I believe the main reason why the manual route was chosen was because it's a simple pure Python implementation. The benefits of that are:

  • works out of the box on any platform that Python works on - no need to compile it for different platforms, no need to create installers for Windows etc. (related: https://github.com/miniupnp/miniupnp/issues/159).
  • no dependencies to track and update as well as a minimal code and config footprint.
  • pure Python (again) easy to inspect, change, modify, etc.

I know it's not the best Python code out there, hence why I thought about refactoring it + adding in the feature requested in this issue.

That said, I've been out of the loop for a long time and @HelloZeroNet would have a better idea of which approach would be best here.

Quick update on this: finally got around to working on this. Currently adding some tests, then will refactor a few odd bits, and finally add code to signal the router to delete a port mapping.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yurkobb picture yurkobb  路  3Comments

unsystemizer picture unsystemizer  路  4Comments

blurHY picture blurHY  路  3Comments

clamever picture clamever  路  4Comments

DaniellMesquita picture DaniellMesquita  路  3Comments