2021-09-26 02:35:02 +00:00
|
|
|
package upnp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2021-10-15 03:43:41 +00:00
|
|
|
|
|
|
|
ip_helper2 "github.com/IceWhaleTech/CasaOS/pkg/utils/ip_helper"
|
2021-09-26 02:35:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestGetCtrlUrl(t *testing.T) {
|
|
|
|
upnp, err := Gateway()
|
|
|
|
if err == nil {
|
|
|
|
upnp.CtrlUrl = GetCtrlUrl(upnp.GatewayHost, upnp.DeviceDescUrl)
|
|
|
|
upnp.LocalHost = ip_helper2.GetLoclIp()
|
|
|
|
upnp.AddPortMapping(8090, 8090, "TCP")
|
|
|
|
//upnp.DelPortMapping(9999, "TCP")
|
|
|
|
}
|
|
|
|
}
|