Skip to content

UPnP

Luke Champine requested to merge upnp into master

UPnP support is here! In local tests it works like a charm. However, the architecture feels a bit hacky to me, and there's certainly room for improvement.

The biggest issue here is that UPnP discovery is performed during initialization, the same way ExternalIP used to be calculated. This has the advantage of centralizing our UPnP code, which is used by both the gateway and the host. But it prevents a common piece of functionality seen in other P2P apps, which is the ability to toggle UPnP support during runtime.

It wouldn't be too tough to add ToggleUPnP functions to the gateway and host (and a /daemon/toggleupnp API call), but it wouldn't be pretty. I think we should wait until the use case is more apparent.

fixes #609 (closed)

Merge request reports