[client] Handle UPnP routers that only support permanent leases (#5826)

This commit is contained in:
Viktor Liu
2026-04-08 17:59:59 +02:00
committed by GitHub
parent c7ba931466
commit 94a36cb53e
6 changed files with 116 additions and 99 deletions
+4 -1
View File
@@ -3,15 +3,18 @@ package portforward
import (
"context"
"net"
"time"
)
// Mapping represents port mapping information.
// Mapping represents an active NAT port mapping.
type Mapping struct {
Protocol string
InternalPort uint16
ExternalPort uint16
ExternalIP net.IP
NATType string
// TTL is the lease duration. Zero means a permanent lease that never expires.
TTL time.Duration
}
// Manager is a stub for js/wasm builds where NAT-PMP/UPnP is not supported.