()
| 302 | } |
| 303 | |
| 304 | initUPnPManager () { |
| 305 | this.upnp = new UPnPManager() |
| 306 | |
| 307 | this.watchUPnPEnabledChange() |
| 308 | |
| 309 | this.watchUPnPPortsChange() |
| 310 | |
| 311 | const enabled = this.configManager.getUserConfig('enable-upnp') |
| 312 | if (!enabled) { |
| 313 | return |
| 314 | } |
| 315 | |
| 316 | this.startUPnPMapping() |
| 317 | } |
| 318 | |
| 319 | async startUPnPMapping () { |
| 320 | const btPort = this.configManager.getSystemConfig('listen-port') |
no test coverage detected