Add option to UPnP map gui port

I think it could be useful to add option to enable/disable UPnP mapping of the gui port or to automatically UPnP map it if NAT traversal is enabled and 0.0.0.0 GUI listen address is set.

I think automatically mapping it is a terrible idea: people thinking they’re just allowing access to other devices in their local network will be inadvertently opening it up to the entire world.

There’s also fun around what happens if multiple devices try to set up upnp mappings for the same gui port. With the sync port, the external and internal ports can be different. With the gui port, Syncthing will have to use the same internal and external port otherwise no one will know which port to use to access the gui!

3 Likes