feat(stream): add NAT-PMP port mapping for remote downloads
Replace anacrolix/upnp with huin/goupnp + custom NAT-PMP (RFC 6886) implementation. NAT-PMP is tried first (faster, more compatible with TP-Link routers), with UPnP-IGD SOAP as fallback. Gateway detection reads /proc/net/route for accuracy. Includes unit tests with mock NAT-PMP server and permanent e2e tests (build tag manual).
This commit is contained in:
parent
819c727bf5
commit
aa6acbabc9
8 changed files with 1030 additions and 24 deletions
|
|
@ -104,6 +104,7 @@ func TestStreamServerRangeTracking(t *testing.T) {
|
|||
}
|
||||
|
||||
srv := NewStreamServerFromDisk(tmpFile, 0)
|
||||
srv.disableUPnP = true
|
||||
ctx := context.Background()
|
||||
url, err := srv.Start(ctx)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue